src/de/uapcore/sudoku/Field.java

changeset 7
2c0a2766461c
parent 5
8ddf4af937d7
--- a/src/de/uapcore/sudoku/Field.java	Sun Jan 27 15:03:57 2013 +0100
+++ b/src/de/uapcore/sudoku/Field.java	Thu Jan 31 18:44:44 2013 +0100
@@ -92,6 +92,10 @@
         super.paintChildren(graphics);
     }
     
+    public boolean isCellEmpty(int x, int y) {
+        return getCellValue(x, y) == 0;
+    }
+    
     public int getCellValue(int x, int y) {
         return cells[x][y].getValue();
     }
@@ -100,6 +104,14 @@
         cells[x][y].setValue(v);
     }
     
+    public void clearCellValue(int x, int y) {
+        setCellValue(x, y, 0);
+    }
+    
+    public void setCellModified(int x, int y, boolean modified) {
+        cells[x][y].setModified(modified);
+    }
+    
     public void setAllCellsModified(boolean modified) {
         for (int x = 0 ; x < 9 ; x++) {
             for (int y = 0 ; y < 9 ; y++) {

mercurial