forked from zhoulisha/Sudoku-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
36 lines (22 loc) · 881 Bytes
/
Copy pathtest.py
File metadata and controls
36 lines (22 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from sudoku_generator import SudokuGenerator
'''
This is a temporary file for making sure that the background program is running correctly
'''
def main():
'''
This initialized the Sudoku generator row length will always be 9, removed cells will
81 - (The difficulty they choose)
Note: Board is initialized to have 0 in every space
'''
sudoku = SudokuGenerator(row_length=9, removed_cells=30)
# fills each 3x3 box on the diagnol starting at (0,0), (3,3) and (6,6)
sudoku.fill_diagonal()
sudoku.print_board() # prints the board
# fills the remaining squares and return a bool indicating whether its solvable
solvable = sudoku.fill_remaining(row=0,col=3)
sudoku.print_board()
print(f'This is solvable, {solvable}')
# Generate sodoku is the function we will be using
return
if __name__ == '__main__':
main()