summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game/Unit.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-02-03 11:57:03 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-02-03 11:57:03 +0100
commit94d279a514326f747ccac8c803b4500955c7a368 (patch)
tree448c3d46dd5257b8e7021cd4a5ebd0d911ccc018 /core/src/ch/asynk/rustanddust/game/Unit.java
parentcbcfb75fbd51915b68c51d15d85fe102a85b50de (diff)
downloadRustAndDust-94d279a514326f747ccac8c803b4500955c7a368.zip
RustAndDust-94d279a514326f747ccac8c803b4500955c7a368.tar.gz
PawnId/UnitID -> PawnCode/UnitCode
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game/Unit.java')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Unit.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Unit.java b/core/src/ch/asynk/rustanddust/game/Unit.java
index 7189f17..df824d8 100644
--- a/core/src/ch/asynk/rustanddust/game/Unit.java
+++ b/core/src/ch/asynk/rustanddust/game/Unit.java
@@ -31,7 +31,7 @@ public class Unit extends HeadedPawn
ARTILLERY
}
- public enum UnitId implements Pawn.PawnId
+ public enum UnitCode implements Pawn.PawnCode
{
GE_AT_GUN("German Anti-Tank Gun"),
GE_INFANTRY("German Infantry"),
@@ -48,7 +48,7 @@ public class Unit extends HeadedPawn
US_WOLVERINE("US Wolverine");
private String s;
- UnitId(String s) { this.s = s; }
+ UnitCode(String s) { this.s = s; }
public String toString() { return s; }
}
@@ -57,8 +57,8 @@ public class Unit extends HeadedPawn
public int cdef;
public int mp;
public int mpLeft;
+ public UnitCode code;
public UnitType type;
- public UnitId id;
public boolean hq;
public boolean ace;
public boolean hasMoved;
@@ -85,12 +85,12 @@ public class Unit extends HeadedPawn
private void updateDescr()
{
if (cdef == -1)
- this.descr = id.toString() + (hq ? " HQ " : "") + (ace ? " Ace " : "") + " (" + rng + "-" + def + "-" + mp + ")";
+ this.descr = code.toString() + (hq ? " HQ " : "") + (ace ? " Ace " : "") + " (" + rng + "-" + def + "-" + mp + ")";
else
- this.descr = id.toString() + (hq ? " HQ " : "") + (ace ? " Ace " : "") + " (" + rng + "-" + def + "/" + cdef + "-" + mp + ")";
+ this.descr = code.toString() + (hq ? " HQ " : "") + (ace ? " Ace " : "") + " (" + rng + "-" + def + "/" + cdef + "-" + mp + ")";
}
- public Unit(Army army, UnitId id, UnitType type, boolean hq, boolean ace, int range, int defense, int concealedDefense, int movementPoints,
+ public Unit(Army army, UnitCode code, UnitType type, boolean hq, boolean ace, int range, int defense, int concealedDefense, int movementPoints,
AtlasRegion chit, AtlasRegion body, AtlasRegion turret, TextureAtlas overlays)
{
this(army, chit, body, turret, overlays);
@@ -100,7 +100,7 @@ public class Unit extends HeadedPawn
this.def = defense;
this.cdef = concealedDefense;
this.mp = movementPoints;
- this.id = id;
+ this.code = code;
this.type = type;
commonSetup();
}
@@ -179,9 +179,9 @@ public class Unit extends HeadedPawn
}
@Override
- public boolean isA(PawnId i)
+ public boolean isA(PawnCode c)
{
- return (id == i);
+ return (code == c);
}
@Override
@@ -205,7 +205,7 @@ public class Unit extends HeadedPawn
@Override
public boolean isHqOf(Pawn other)
{
- return (isHq() && other.isA(id));
+ return (isHq() && other.isA(code));
}
public void promote()