diff options
Diffstat (limited to 'src/Tile.java')
-rw-r--r-- | src/Tile.java | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/Tile.java b/src/Tile.java index 8624f08..cbdeda4 100644 --- a/src/Tile.java +++ b/src/Tile.java @@ -1,22 +1,15 @@ public class Tile { - public int x; - public int y; - public int len; - public TileType tileType = TileType.GRASS; - public EntityType entityType = EntityType.NULL; - public boolean selected = false; - public boolean attack = false; - public int width; + public enum Type { + GRASS, + }; - public Tile (int row, int col, int window, int width) { - this.width = width; - this.calc(row, col, window); - } + public final int x, y; + public final Type type; - public void calc (int row, int col, int window) { - this.len = (int) (window/(double)this.width); - this.x = col*len; - this.y = row*len; - } + public Tile(Type type, int x, int y) { + this.type = type; + this.x = x; + this.y = y; + } } |