summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-15 11:44:44 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-15 11:44:44 +0200
commit6e8b647d22d472a4aa0b979ea32a8135b1000ba0 (patch)
tree9e11044aaf46dbd1c8a1b76415d5718edf391cd9 /core/src/ch/asynk/tankontank/game
parent8337a9748f83690781060bfe91495576a87ad5a8 (diff)
downloadRustAndDust-6e8b647d22d472a4aa0b979ea32a8135b1000ba0.zip
RustAndDust-6e8b647d22d472a4aa0b979ea32a8135b1000ba0.tar.gz
Hex: improve debug output
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index b586515..84b2a34 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -113,6 +113,7 @@ public class Hex extends Tile
terrainBonus = false;
}
+ int tdef = 0;
int def = u.def;
switch(terrain) {
case HILLS:
@@ -124,14 +125,14 @@ public class Hex extends Tile
if (u.type != Unit.UnitType.HARD_TARGET)
def = u.cdef;
if (terrainBonus)
- def += 1;
+ tdef = 1;
break;
default:
def = ((Unit) target).def;
break;
}
- System.err.println(" >= " + def);
- return def;
+ System.err.println(" >= " + def + " + " + tdef);
+ return (def + tdef);
}
}