Compare commits
2 commits
521b3fb05b
...
2acf69d466
Author | SHA1 | Date | |
---|---|---|---|
|
2acf69d466 | ||
|
15d58e52a5 |
2 changed files with 6 additions and 3 deletions
|
@ -88,8 +88,7 @@ public class SudokuController {
|
||||||
int row = view.getSelectedRow();
|
int row = view.getSelectedRow();
|
||||||
int col = view.getSelectedColumn();
|
int col = view.getSelectedColumn();
|
||||||
|
|
||||||
String inputText = view.getCellValue(row, col);
|
int value = Integer.parseInt(view.getCellValue(row, col));
|
||||||
int value = Integer.parseInt(inputText);
|
|
||||||
// Check if the input is legal and update the model and view
|
// Check if the input is legal and update the model and view
|
||||||
if (model.isLegal(row, col, value)) {
|
if (model.isLegal(row, col, value)) {
|
||||||
model.set(row, col, value);
|
model.set(row, col, value);
|
||||||
|
|
|
@ -115,7 +115,11 @@ public class Solver implements SudokuSolver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* <p>
|
||||||
|
* This is <b>not</b> checked for validity
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void set(int row, int col, int val) {
|
public void set(int row, int col, int val) {
|
||||||
if (row < 9 && col < 9) {
|
if (row < 9 && col < 9) {
|
||||||
|
|
Loading…
Reference in a new issue