132 "Sudoku", JOptionPane.WARNING_MESSAGE); |
132 "Sudoku", JOptionPane.WARNING_MESSAGE); |
133 } |
133 } |
134 } |
134 } |
135 |
135 |
136 private void solve() { |
136 private void solve() { |
137 // TODO: solve |
137 if (!solver.check(field) || !solver.solve(field)) { |
|
138 JOptionPane.showMessageDialog(field, "Das Feld ist nicht lösbar!", |
|
139 "Sudoku", JOptionPane.WARNING_MESSAGE); |
|
140 } |
138 } |
141 } |
139 |
142 |
140 private boolean saveUnsaved() { |
143 private boolean saveUnsaved() { |
141 boolean proceed = false; |
144 boolean proceed = false; |
142 if (field.isAnyCellModified()) { |
145 if (field.isAnyCellModified()) { |