-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialize.py
113 lines (90 loc) · 4.33 KB
/
initialize.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
from piece import *
def initialize_pieces():
pieces = list()
state1 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CROSS, Orientation.OUT),
Part(Shape.CROSS, Orientation.IN),
Part(Shape.CIRCLE, Orientation.IN))
pieces.append(Piece(state1))
state2 = State(Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.IN),
Part(Shape.ARROW_IN, Orientation.IN))
pieces.append(Piece(state2))
state3 = State(Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.IN),
Part(Shape.CROSS, Orientation.IN))
pieces.append(Piece(state3))
state4 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.CROSS, Orientation.IN),
Part(Shape.ARROW_IN, Orientation.IN))
pieces.append(Piece(state4))
state5 = State(Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.IN),
Part(Shape.CIRCLE, Orientation.IN))
pieces.append(Piece(state5))
state6 = State(Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.IN),
Part(Shape.ARROW_OUT, Orientation.IN))
pieces.append(Piece(state6))
state7 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.IN),
Part(Shape.ARROW_OUT, Orientation.IN))
pieces.append(Piece(state7))
state8 = State(Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.IN),
Part(Shape.CROSS, Orientation.IN))
pieces.append(Piece(state8))
state9 = State(Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.IN),
Part(Shape.CROSS, Orientation.IN))
pieces.append(Piece(state9))
state10 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CROSS, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.IN),
Part(Shape.ARROW_OUT, Orientation.IN))
pieces.append(Piece(state10))
state11 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.IN),
Part(Shape.ARROW_OUT, Orientation.IN))
pieces.append(Piece(state11))
state12 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.CIRCLE, Orientation.IN),
Part(Shape.CROSS, Orientation.IN))
pieces.append(Piece(state12))
state13 = State(Part(Shape.ARROW_IN, Orientation.OUT),
Part(Shape.CROSS, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.IN),
Part(Shape.ARROW_IN, Orientation.IN))
pieces.append(Piece(state13))
state14 = State(Part(Shape.CROSS, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.IN),
Part(Shape.CIRCLE, Orientation.IN))
pieces.append(Piece(state14))
state15 = State(Part(Shape.CIRCLE, Orientation.OUT),
Part(Shape.CROSS, Orientation.OUT),
Part(Shape.ARROW_IN, Orientation.IN),
Part(Shape.CIRCLE, Orientation.IN))
pieces.append(Piece(state15))
state16 = State(Part(Shape.CROSS, Orientation.OUT),
Part(Shape.ARROW_OUT, Orientation.OUT),
Part(Shape.CROSS, Orientation.IN),
Part(Shape.ARROW_IN, Orientation.IN))
pieces.append(Piece(state16))
return pieces
def initialize_mapping_matrix():
mm = list()
for i in range(1, 5):
for j in range(1, 5):
mm.append([[i], [j]])
return mm