refactoring formatting

This commit is contained in:
StevanFreeborn
2022-05-27 09:54:17 -05:00
parent 4b1eaf0615
commit 65b4154beb
+3 -3
View File
@@ -188,7 +188,7 @@ class SudokuSolver {
let createBoard = (puzzleValues) => {
let board = [[], [], [], [], [], [], [], [], []]
let boardRow = -1
let row = -1
for (let i = 0; i < puzzleValues.length; i++) {
@@ -198,13 +198,13 @@ class SudokuSolver {
// board row
if (i % 9 === 0) {
boardRow = boardRow + 1;
row = row + 1;
}
// push the current puzzle value into the
// correct board rows array
board[boardRow].push(puzzleValues[i]);
board[row].push(puzzleValues[i]);
}
// return the board