-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
31 lines (28 loc) · 801 Bytes
/
test.py
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
from solver import *
board1 = [
[7, 8, 0, 4, 0, 0, 1, 2, 0],
[6, 0, 0, 0, 7, 5, 0, 0, 9],
[0, 0, 0, 6, 0, 1, 0, 7, 8],
[0, 0, 7, 0, 4, 0, 2, 6, 0],
[0, 0, 1, 0, 5, 0, 9, 3, 0],
[9, 0, 4, 0, 6, 0, 0, 0, 5],
[0, 7, 0, 3, 0, 0, 0, 1, 2],
[1, 2, 0, 0, 0, 7, 4, 0, 0],
[0, 4, 9, 2, 0, 6, 0, 0, 7]
]
board = [
[0, 5, 0, 0, 2, 0, 9, 0, 3],
[9, 0, 0, 0, 0, 6, 0, 0, 4],
[0, 0, 0, 0, 1, 0, 0, 0, 0],
[0, 2, 0, 4, 6, 0, 0, 0, 8],
[0, 7, 4, 8, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 0, 7, 0],
[0, 9, 0, 0, 0, 0, 0, 0, 5],
[5, 0, 1, 0, 0, 0, 0, 2, 6],
[0, 0, 0, 0, 0, 0, 0, 0, 0]
]
print("Board :")
print_board(board)
solve(board)
print("Solution :")
print_board(board)