diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-23 23:02:49 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-23 23:02:49 +0100 |
commit | 6ea6d191d0cad59845efb41764310230786621f3 (patch) | |
tree | c1bb7d5dec13f27c7b052480c40ae4b683197cb6 /core | |
parent | e64493cfb9008faeb67b5645d8a625ffcb15e1c1 (diff) | |
download | RustAndDust-6ea6d191d0cad59845efb41764310230786621f3.zip RustAndDust-6ea6d191d0cad59845efb41764310230786621f3.tar.gz |
Map4Orders: cmd -> order
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/map/Map4Orders.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java index dd133ca..823c05a 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map4Orders.java @@ -98,25 +98,25 @@ public abstract class Map4Orders extends Map3Animations { attack(unit, target, true); - Order cmd = Order.get(); - cmd.setEngage(unit, target); - return (process(cmd) == 1); + Order order = Order.get(); + order.setEngage(unit, target); + return (process(order) == 1); } public void promoteUnit(final Unit unit) { - Order cmd = Order.get(); - cmd.setPromote(unit); - process(cmd); + Order order = Order.get(); + order.setPromote(unit); + process(order); } // STATES ENTRY <- private Order getMoveOrder(Unit unit, Move move) { - Order cmd = Order.get(); - cmd.setMove(unit, move); - return cmd; + Order order = Order.get(); + order.setMove(unit, move); + return order; } private void initMove(Unit unit) @@ -138,30 +138,30 @@ public abstract class Map4Orders extends Map3Animations return 1; } - private int process(Order cmd) + private int process(Order order) { - RustAndDust.debug("Order", cmd.toString()); + RustAndDust.debug("Order", order.toString()); int r = 1; - switch(cmd.type) { + switch(order.type) { case MOVE: - r = process(cmd.unit, cmd.move); + r = process(order.unit, order.move); break; case PROMOTE: - r = doPromoteUnit(cmd.unit); + r = doPromoteUnit(order.unit); break; case ENGAGE: - r = doEngagement(cmd.engagement); + r = doEngagement(order.engagement); break; default: - System.err.println(String.format("process wrong Order type %s", cmd.type)); + System.err.println(String.format("process wrong Order type %s", order.type)); r = -1; break; } if (r != -1) { - orders.add(cmd); + orders.add(order); game.ctrl.orderProcessedCb(); } |