summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateCommon.java6
2 files changed, 7 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 8310788..cdf46ce 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -85,6 +85,11 @@ public abstract class Map extends Board
activatedPawns.clear();
}
+ public Hex getHexAt(float x, float y)
+ {
+ return (Hex) getTileAt(x, y);
+ }
+
public Hex getHex(int col, int row)
{
return (Hex) getTile(col, row);
diff --git a/core/src/ch/asynk/tankontank/game/states/StateCommon.java b/core/src/ch/asynk/tankontank/game/states/StateCommon.java
index 0ff9ba1..91f0609 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateCommon.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateCommon.java
@@ -77,16 +77,14 @@ public abstract class StateCommon implements State
public boolean downInMap(float x, float y)
{
- // FIXME
- downHex = (Hex) map.getTileAt(x, y);
+ downHex = map.getHexAt(x, y);
if (downHex == null) return false;
return !downHex.isOffMap();
}
public boolean upInMap(float x, float y)
{
- // FIXME
- upHex = (Hex) map.getTileAt(x, y);
+ upHex = map.getHexAt(x, y);
if (upHex == null) return false;
return !upHex.isOffMap();
}