diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-24 19:33:09 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-24 19:33:09 +0100 |
commit | b7e35dc0368e77e36f0e71d0348adf2bea847588 (patch) | |
tree | 4e6e17e0b31da464d8761c5135a7d7dbe65414c7 /core/src/ch/asynk/rustanddust | |
parent | 4e84edbf55e8ac24fbe78e86395bfea189bec187 (diff) | |
download | RustAndDust-b7e35dc0368e77e36f0e71d0348adf2bea847588.zip RustAndDust-b7e35dc0368e77e36f0e71d0348adf2bea847588.tar.gz |
Hex: simplify blockLineOfSightFrom(Tile)
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Hex.java | 5 |
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; |