diff -r a46d0179df7a -r 606bba9825c8 icfp-model/src/main/java/ru/bosony/model/game/Game.java --- a/icfp-model/src/main/java/ru/bosony/model/game/Game.java Sun Jul 15 04:09:14 2012 +0400 +++ b/icfp-model/src/main/java/ru/bosony/model/game/Game.java Sun Jul 15 04:40:38 2012 +0400 @@ -62,7 +62,6 @@ // Score int prevScore = score; - score--; // Moving and scoring route.add(mov); @@ -90,6 +89,7 @@ nextRobotCoord = robotCoord.down(); break; } + score--; Cell nextRobotCell = mine.getCell(nextRobotCoord); CellContent nextRobotCellContent = getContent(nextRobotCell); if (nextRobotCellContent == Empty || nextRobotCellContent == Earth) { @@ -105,11 +105,11 @@ lastScoreChange = score - prevScore; state = GameState.Win; return state; - } else if (robotCoord.right() == nextRobotCoord && nextRobotCellContent == Rock + } else if (robotCoord.right().equals(nextRobotCoord) && nextRobotCellContent == Rock && getContent(mine.getCell(nextRobotCoord.right())) == Empty) { moveRobot(nextRobotCell); mine.getCell(nextRobotCoord.right()).setContent(Rock); - } else if (robotCoord.left() == nextRobotCoord && nextRobotCellContent == Rock + } else if (robotCoord.left().equals(nextRobotCoord) && nextRobotCellContent == Rock && getContent(mine.getCell(nextRobotCoord.left())) == Empty) { moveRobot(nextRobotCell); mine.getCell(nextRobotCoord.left()).setContent(Rock);