Compare commits

...

2 commits

Author SHA1 Message Date
Imbus
2acf69d466 More clear documentation 2023-12-10 16:08:51 +01:00
Imbus
15d58e52a5 Simplifying 2023-12-10 16:08:28 +01:00
2 changed files with 6 additions and 3 deletions

View file

@ -88,8 +88,7 @@ public class SudokuController {
int row = view.getSelectedRow();
int col = view.getSelectedColumn();
String inputText = view.getCellValue(row, col);
int value = Integer.parseInt(inputText);
int value = Integer.parseInt(view.getCellValue(row, col));
// Check if the input is legal and update the model and view
if (model.isLegal(row, col, value)) {
model.set(row, col, value);

View file

@ -115,7 +115,11 @@ public class Solver implements SudokuSolver {
}
}
/** {@inheritDoc} */
/**
* {@inheritDoc}
* <p>
* This is <b>not</b> checked for validity
*/
@Override
public void set(int row, int col, int val) {
if (row < 9 && col < 9) {