Commit 893fe053 authored by nargessalehi98's avatar nargessalehi98

Update Wall class as a Rectangle.

parent ac858009
import java.awt.*;
public class Wall extends Rectangle {
private int x, y, width, height;
private Graphics2D g2d;
private int verOrHor;
public Wall(int x, int y, int width, int height, Graphics2D g2d,int verOrHor) {
this.x = x;
this.y = y;
this.height = height;
this.width = width;
this.g2d = g2d;
this.verOrHor=verOrHor;
g2d.fillRect(x, y, width, height);
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public double getWidth() {
return width;
}
public double getHeight() {
return height;
}
}
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