summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-24 19:33:09 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-24 19:33:09 +0100
commitb7e35dc0368e77e36f0e71d0348adf2bea847588 (patch)
tree4e6e17e0b31da464d8761c5135a7d7dbe65414c7 /core/src/ch/asynk/rustanddust/game
parent4e84edbf55e8ac24fbe78e86395bfea189bec187 (diff)
downloadRustAndDust-b7e35dc0368e77e36f0e71d0348adf2bea847588.zip
RustAndDust-b7e35dc0368e77e36f0e71d0348adf2bea847588.tar.gz
Hex: simplify blockLineOfSightFrom(Tile)
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Hex.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Hex.java b/core/src/ch/asynk/rustanddust/game/Hex.java
index 27b52cd..d8800ec 100644
--- a/core/src/ch/asynk/rustanddust/game/Hex.java
+++ b/core/src/ch/asynk/rustanddust/game/Hex.java
@@ -73,10 +73,7 @@ public class Hex extends Tile
if (isA(Terrain.DEPRESSION))
return false;
- if (isA(Terrain.CLEAR) && !hasUnits())
- return false;
-
- if (tile.isA(Terrain.HILLS) && isA(Terrain.CLEAR))
+ if (isA(Terrain.CLEAR) && (!hasUnits() || tile.isA(Terrain.HILLS)))
return false;
return true;