Commit 6c645224 authored by nargessalehi98's avatar nargessalehi98

Add javaDoc.

parent feec7af9
import java.awt.*;
/**
* this class keeps wall info
* @author narges salehi & sepehr tavakoli
* @version 1.1
* @since July 21 2020
*/
public class Wall {
//coordinate of wall
private int x, y, width, height;
//Graphic2D to draw wall
private Graphics2D g2d;
/**
* constructor of each wall
* @param x of wall
* @param y of wall
* @param width of wall
* @param height of wall
* @param g2d to draw wall
*/
public Wall(int x, int y, int width, int height, Graphics2D g2d) {
//set value given to constructor
this.x = x;
this.y = y;
this.height = height;
......@@ -16,18 +32,30 @@ public class Wall {
g2d.fillRect(x, y, width, height);
}
/**
* @return x of wall
*/
public int getX() {
return x;
}
/**
* @return y of wall
*/
public int getY() {
return y;
}
/**
* @return width of wall
*/
public int getWidth() {
return width;
}
/**
* @return Height of wall
*/
public int 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