From 3555c49ad4440624bfb5923297b38ee1f26f71b3 Mon Sep 17 00:00:00 2001 From: Reza Behzadan Date: Sat, 30 May 2020 08:21:25 +0430 Subject: [PATCH] before refactoring sudoku logic --- boards/041.txt | 9 +++++++++ config.lua | 2 +- sudoku/sudoku.lua | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 boards/041.txt diff --git a/boards/041.txt b/boards/041.txt new file mode 100644 index 0000000..9922aa5 --- /dev/null +++ b/boards/041.txt @@ -0,0 +1,9 @@ +0 0 4 3 0 0 2 0 9 +0 0 5 0 0 9 0 0 1 +0 7 0 0 6 0 0 4 3 +0 0 6 0 0 2 0 8 7 +1 9 0 0 0 7 4 0 0 +0 5 0 0 8 3 0 0 0 +6 0 0 0 0 0 1 0 5 +0 0 3 5 0 8 6 9 0 +0 4 2 9 1 0 3 0 0 diff --git a/config.lua b/config.lua index ea49276..67b9696 100644 --- a/config.lua +++ b/config.lua @@ -1,6 +1,6 @@ return { board = { - filePath = "boards/040.txt", + filePath = "boards/005.txt", }, window = { bgColor = "FFFFFF", diff --git a/sudoku/sudoku.lua b/sudoku/sudoku.lua index 053e584..1cd5217 100644 --- a/sudoku/sudoku.lua +++ b/sudoku/sudoku.lua @@ -104,7 +104,7 @@ function sudoku.calCellValidOptions(board, x, y) return v end -function sudoku.buildSearchSpave(board) +function sudoku.buildSearchSpace(board) local s = {} for i = 1, 9 do s[i] = {}