16 lines
312 B
Java
16 lines
312 B
Java
import java.awt.Graphics;
|
|
|
|
public class Tile {
|
|
int x,y,width,height;
|
|
|
|
public Tile(int x, int y, int width, int height){
|
|
this.x = x;
|
|
this.y = y;
|
|
this.width = width;
|
|
this.height = height;
|
|
}
|
|
|
|
public void draw(Graphics g){
|
|
g.fillRect(x,y,width,height);
|
|
}
|
|
} |