icfp-model/src/main/java/ru/bosony/model/game/Game.java
changeset 28 9c68562715ed
parent 27 505c25412b16
child 29 66aa96e8fd92
equal deleted inserted replaced
27:505c25412b16 28:9c68562715ed
   156 				Cell leftAndDownCell = mine.getCell(leftAndDownCoord);
   156 				Cell leftAndDownCell = mine.getCell(leftAndDownCoord);
   157 
   157 
   158 				if (getContent(curCell) == Rock && getContent(downCell) == Empty) {
   158 				if (getContent(curCell) == Rock && getContent(downCell) == Empty) {
   159 					getCell(curCoord, newCells).setContent(Empty);
   159 					getCell(curCoord, newCells).setContent(Empty);
   160 					getCell(downCoord, newCells).setContent(Rock);
   160 					getCell(downCoord, newCells).setContent(Rock);
   161 				} else if (getContent(curCell) == Rock && getContent(downCell) == Empty
   161 				} else if (getContent(curCell) == Rock && getContent(downCell) == Rock
   162 						&& getContent(rightCell) == Empty && getContent(rightAndDownCell) == Empty) {
   162 						&& getContent(rightCell) == Empty && getContent(rightAndDownCell) == Empty) {
   163 					getCell(curCoord, newCells).setContent(Empty);
   163 					getCell(curCoord, newCells).setContent(Empty);
   164 					getCell(rightAndDownCoord, newCells).setContent(Rock);
   164 					getCell(rightAndDownCoord, newCells).setContent(Rock);
   165 				} else if (getContent(curCell) == Rock && getContent(downCell) == Rock
   165 				} else if (getContent(curCell) == Rock && getContent(downCell) == Rock
   166 						&& (getContent(rightCell) != Empty || getContent(rightAndDownCell) != Empty)
   166 						&& (getContent(rightCell) != Empty || getContent(rightAndDownCell) != Empty)