diff -r 80446fa5641a -r f83e1e778061 src/ru/bosony/icfpc/Mine.java --- a/src/ru/bosony/icfpc/Mine.java Fri Jul 13 18:13:05 2012 +0400 +++ b/src/ru/bosony/icfpc/Mine.java Fri Jul 13 18:45:38 2012 +0400 @@ -1,10 +1,10 @@ package ru.bosony.icfpc; +import java.nio.file.FileVisitOption; import java.util.LinkedHashMap; import java.util.Map; import ru.bosony.icfpc.cells.Cell; -import ru.bosony.icfpc.cells.CellTypes; /** * Шахта @@ -16,44 +16,82 @@ { private Map cellPrototypes = new LinkedHashMap(); - private Cell cells[][]; + private Cell cells[][][]; + private int index = 0; public Mine(int n, int m, String content) { initCellPrototypes(); - cells = new Cell[n][m]; + cells = new Cell[2][n][m]; int index = 0; for(int i=0; i1; --j) + { + switch(firstBuffer()[i][j]) + { + case ROCK: + { + if(firstBuffer()[i][j-1] == Cell.EMPTY) + { + secondBuffer()[i][j] = Cell.EMPTY; + } + } + break; + } + } + } + }