90 |
90 |
91 graphics.drawImage(img, 0, 0, this); |
91 graphics.drawImage(img, 0, 0, this); |
92 super.paintChildren(graphics); |
92 super.paintChildren(graphics); |
93 } |
93 } |
94 |
94 |
|
95 public boolean isCellEmpty(int x, int y) { |
|
96 return getCellValue(x, y) == 0; |
|
97 } |
|
98 |
95 public int getCellValue(int x, int y) { |
99 public int getCellValue(int x, int y) { |
96 return cells[x][y].getValue(); |
100 return cells[x][y].getValue(); |
97 } |
101 } |
98 |
102 |
99 public void setCellValue(int x, int y, int v) { |
103 public void setCellValue(int x, int y, int v) { |
100 cells[x][y].setValue(v); |
104 cells[x][y].setValue(v); |
|
105 } |
|
106 |
|
107 public void clearCellValue(int x, int y) { |
|
108 setCellValue(x, y, 0); |
|
109 } |
|
110 |
|
111 public void setCellModified(int x, int y, boolean modified) { |
|
112 cells[x][y].setModified(modified); |
101 } |
113 } |
102 |
114 |
103 public void setAllCellsModified(boolean modified) { |
115 public void setAllCellsModified(boolean modified) { |
104 for (int x = 0 ; x < 9 ; x++) { |
116 for (int x = 0 ; x < 9 ; x++) { |
105 for (int y = 0 ; y < 9 ; y++) { |
117 for (int y = 0 ; y < 9 ; y++) { |