diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-27 01:05:38 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-27 01:05:38 +0100 |
commit | 3b5a05b292eefeabcd1806e5b6eb90185d5fe915 (patch) | |
tree | 0dc76642f125dba0556a25e2e89ec3ba43b522d9 | |
parent | fc0cf498781e438d3f3e899461d1dca54dba2ca7 (diff) | |
download | RustAndDust-3b5a05b292eefeabcd1806e5b6eb90185d5fe915.zip RustAndDust-3b5a05b292eefeabcd1806e5b6eb90185d5fe915.tar.gz |
Order: remove useless unitCode, unitType, unitHex
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Order.java | 15 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java | 1 |
2 files changed, 2 insertions, 14 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Order.java b/core/src/ch/asynk/rustanddust/game/Order.java index e57aa2e..fc8925a 100644 --- a/core/src/ch/asynk/rustanddust/game/Order.java +++ b/core/src/ch/asynk/rustanddust/game/Order.java @@ -36,9 +36,6 @@ public class Order implements Disposable, Pool.Poolable, Comparable<Unit> public OrderType type; public Unit unit; - public Unit.UnitCode unitCode; - public Unit.UnitType unitType; - public Hex unitHex; public Move move; public Engagement engagement; @@ -91,27 +88,19 @@ public class Order implements Disposable, Pool.Poolable, Comparable<Unit> { this.type = OrderType.MOVE; this.move = move; - setUnit(unit); + this.unit = unit; } public void setPromote(Unit unit) { this.type = OrderType.PROMOTE; - setUnit(unit); + this.unit = unit; } public void setEngage(Unit unit, Unit target) { this.type = OrderType.ENGAGE; this.engagement = Engagement.get(unit, target); - setUnit(unit); - } - - private void setUnit(Unit unit) - { this.unit = unit; - this.unitCode = unit.code; - this.unitType = unit.type; - this.unitHex = unit.getHex(); } } diff --git a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java index a961b11..a12d463 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java @@ -394,7 +394,6 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal Move move = Move.get(unit, from, to, orientation, path); Order o = Order.get(); o.setMove(unit, move); - o.unitHex = from; return o; } |