diff options
author | Nao Pross <naopross@thearcway.org> | 2018-11-19 00:02:46 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-11-19 00:02:46 +0100 |
commit | bf6bbd5609cd125d8b3e5a7fbe6f2cd49146af49 (patch) | |
tree | d16adf89b93b44c4a040725b54dbfe5ccf84ef14 /src/Tile.java | |
parent | Add gitignore, remove binaries (diff) | |
download | Subconscious-java-bf6bbd5609cd125d8b3e5a7fbe6f2cd49146af49.tar.gz Subconscious-java-bf6bbd5609cd125d8b3e5a7fbe6f2cd49146af49.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Tile.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Tile.java b/src/Tile.java index f2548f7..7420a2a 100644 --- a/src/Tile.java +++ b/src/Tile.java @@ -5,11 +5,20 @@ public class Tile { CLEAR, GRASS, WATER, MOUNTAIN, NONE }; + // TODO: make public private final int x, y; + // TODO: make final private Type type; + // TODO: refractor to inRange; private boolean selected; - private boolean cursorOnIt; + // TODO: it would be better if the MapScene had a member tileUnderCursor + private boolean cursorOnIt; // underCursor? + // TODO: make final, or make a table to match type to cost private double cost; + // TODO: remove and make here a method + // double distanceFrom(Tile other); + // or a method in Map.java + // double distanceBetween(Tile firstTile, Tile secondTile); private double distance; public Tile(Type type, int x, int y) { @@ -64,6 +73,7 @@ public class Tile { return this.type; } + // TODO: remove this feature and make the member final public void setType(Type type) { this.type = type; switch (this.type) { @@ -99,6 +109,7 @@ public class Tile { return this.selected; } + // TODO: rename to isInRange() and this.selected => inRange public boolean isSelected() { return this.selected; } |