-
Notifications
You must be signed in to change notification settings - Fork 3
/
dump.py
54 lines (45 loc) · 1.41 KB
/
dump.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import json
BLACK = False
WHITE = True
state1 = {
WHITE: [
(1, -4), (2, -4), (3, -4),
(1, -3), (2, -3),
(1, -2),
],
BLACK: [
(-1, 2),
(-2, 3), (-1, 3),
(-3, 4), (-2, 4), (-1, 4),
]
}
state2 = {
WHITE: [
(0, -4), (1, -4), (2, -4), (3, -4), (4, -4),
(-1, -3), (0, -3), (1, -3), (2, -3), (3, -3), (4, -3),
(0, -2), (1, -2), (2, -2),
],
BLACK: [
(-2, 2), (-1, 2), (0, 2),
(-4, 3), (-3, 3), (-2, 3), (-1, 3), (0, 3), (1, 3),
(-4, 4), (-3, 4), (-2, 4), (-1, 4), (0, 4),
]
}
state3 = {
WHITE: [
(0, -4), (1, -4), (3, -4), (4, -4),
(-1, -3), (0, -3), (0, -1), (1, -1), (3, -3), (4, -3),
(-1, 0), (0, 0), (1, 0),
],
BLACK: [
(-1, 1), (-1, 2), (0, 1),
(-4, 1), (-4, 2), (-4, 3), (3, 1), (2, 2), (1, 3),
(-4, 4), (-3, 4), (-2, 4), (-1, 4), (0, 4),
]
}
with open('1.json', 'w') as fp:
json.dump(state1, fp)
with open('2.json', 'w') as fp:
json.dump(state2, fp)
with open('3.json', 'w') as fp:
json.dump(state3, fp)