Simplifying

This commit is contained in:
Imbus 2023-12-10 16:08:28 +01:00
parent 521b3fb05b
commit 15d58e52a5

View file

@ -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);