summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/Attack.java14
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java2
3 files changed, 13 insertions, 13 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Attack.java b/core/src/ch/asynk/tankontank/engine/Attack.java
index 2ec5e09..6bdc9af 100644
--- a/core/src/ch/asynk/tankontank/engine/Attack.java
+++ b/core/src/ch/asynk/tankontank/engine/Attack.java
@@ -2,20 +2,20 @@ package ch.asynk.tankontank.engine;
public class Attack
{
- Pawn assaulter;
- Pawn target;
- int distance;
- boolean isClear;
- boolean isFlank;
+ public Pawn attacker;
+ public Pawn target;
+ public int distance;
+ public boolean isClear;
+ public boolean isFlank;
public String toString()
{
- return "engage : " + assaulter + " " + target + " distance:" + distance + " clear:" + isClear + " flank:" + isFlank;
+ return String.format("attack : %s -> %s dist:%d clear:%b flank:%b", attacker, target, distance, isClear, isFlank);
}
public void reset()
{
- assaulter = null;
+ attacker = null;
target = null;
distance = 0;;
isClear = false;
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index f609fb9..00965b3 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -39,7 +39,7 @@ public abstract class Pawn implements Moveable, Disposable
protected String descr;
private Sprite sprite;
private StackedImages overlays;
- protected Attack engagement;
+ protected Attack attack;
protected Move move;
public abstract int getMovementPoints();
@@ -73,8 +73,8 @@ public abstract class Pawn implements Moveable, Disposable
this.prevTile = null;
this.position = new Vector3(0f, 0f, 0f);
this.prevPosition = new Vector3(0f, 0f, 0f);
- this.engagement = new Attack();
- this.engagement.assaulter = this;
+ this.attack = new Attack();
+ this.attack.attacker = this;
}
public Pawn(Faction faction, String name, TextureAtlas pawns, TextureAtlas overlays)
@@ -105,7 +105,7 @@ public abstract class Pawn implements Moveable, Disposable
public void reset()
{
- engagement.reset();
+ attack.reset();
if (move != null) {
move.dispose();
move = null;
@@ -166,7 +166,7 @@ public abstract class Pawn implements Moveable, Disposable
public boolean isFlankAttack()
{
- return (engagement.isClear && engagement.isFlank);
+ return (attack.isClear && attack.isFlank);
}
public Tile getTile()
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java
index ff373b0..da02287 100644
--- a/core/src/ch/asynk/tankontank/game/Unit.java
+++ b/core/src/ch/asynk/tankontank/game/Unit.java
@@ -315,7 +315,7 @@ public class Unit extends HeadedPawn
@Override
public void engage()
{
- TankOnTank.debug(engagement.toString());
+ TankOnTank.debug(attack.toString());
hasFired = true;
updateOverlays();
}