diff -r f1d7de36b01e -r 5179eff8a9b6 src/de/uapcore/sudoku/Field.java --- a/src/de/uapcore/sudoku/Field.java Sat Jan 26 15:48:59 2013 +0100 +++ b/src/de/uapcore/sudoku/Field.java Sat Jan 26 17:42:07 2013 +0100 @@ -13,7 +13,7 @@ * * @author mike */ -public class Field extends JPanel { +public final class Field extends JPanel { private SudokuTextField[][] cells; public Field() { @@ -66,5 +66,30 @@ graphics.drawImage(img, 0, 0, this); } + public int getCellValue(int x, int y) { + return cells[x][y].getValue(); + } + public void setCellValue(int x, int y, int v) { + cells[x][y].setValue(v); + } + + public void setAllCellsModified(boolean modified) { + for (int x = 0 ; x < 9 ; x++) { + for (int y = 0 ; y < 9 ; y++) { + cells[x][y].setModified(modified); + } + } + } + + public boolean isAnyCellModified() { + for (int x = 0 ; x < 9 ; x++) { + for (int y = 0 ; y < 9 ; y++) { + if (cells[x][y].isModified()) { + return true; + } + } + } + return false; + } }