Commit e4255210 authored by nargessalehi98's avatar nargessalehi98

Add new Update.

parent 3a518db6
...@@ -4,16 +4,14 @@ public class Wall extends Rectangle { ...@@ -4,16 +4,14 @@ public class Wall extends Rectangle {
private int x, y, width, height; private int x, y, width, height;
private Graphics2D g2d; private Graphics2D g2d;
private int verOrHor;
public Wall(int x, int y, int width, int height, Graphics2D g2d,int verOrHor) { public Wall(int x, int y, int width, int height, Graphics2D g2d) {
this.x = x; this.x = x;
this.y = y; this.y = y;
this.height = height; this.height = height;
this.width = width; this.width = width;
this.g2d = g2d; this.g2d = g2d;
this.verOrHor=verOrHor;
g2d.fillRect(x, y, width, height); g2d.fillRect(x, y, width, height);
} }
...@@ -33,4 +31,9 @@ public class Wall extends Rectangle { ...@@ -33,4 +31,9 @@ public class Wall extends Rectangle {
public double getHeight() { public double getHeight() {
return height; return height;
} }
@Override
public String toString() {
return x+" "+y;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment