1.1 --- a/icfp-model/src/main/java/ru/bosony/model/game/Game.java Sun Jul 15 01:24:31 2012 +0400
1.2 +++ b/icfp-model/src/main/java/ru/bosony/model/game/Game.java Sun Jul 15 02:07:40 2012 +0400
1.3 @@ -25,12 +25,13 @@
1.4 */
1.5 public class Game {
1.6
1.7 - Mine mine = null;
1.8 - private Cell[][] prevStepCells;
1.9 - protected int score = 0;
1.10 - protected int lastScoreChange = 0;
1.11 - protected GameState state = GameState.Game;
1.12 - protected int lambdaCollectedCount = 0;
1.13 + Mine mine = null;
1.14 + private Cell[][] prevStepCells;
1.15 + protected int score = 0;
1.16 + protected int lastScoreChange = 0;
1.17 + protected GameState state = GameState.Game;
1.18 + protected int lambdaCollectedCount = 0;
1.19 + protected List<Movement> route = new ArrayList<Movement>();
1.20
1.21 public Game(Mine mine) {
1.22 this.mine = mine;
1.23 @@ -67,6 +68,7 @@
1.24 score--;
1.25
1.26 // Moving and scoring
1.27 + route.add(mov);
1.28 Coordinate nextRobotCoord = null;
1.29 switch (mov) {
1.30 case ABORT:
1.31 @@ -220,4 +222,16 @@
1.32 public int getLambdaCollectedCount() {
1.33 return lambdaCollectedCount;
1.34 }
1.35 +
1.36 + public List<Movement> getRoute() {
1.37 + return route;
1.38 + }
1.39 +
1.40 + public String getStringRoute() {
1.41 + String movs = "";
1.42 + for (Movement mov : route) {
1.43 + movs += mov.toText();
1.44 + }
1.45 + return movs;
1.46 + }
1.47 }