-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2by2cube_dir.py
52 lines (39 loc) · 1.04 KB
/
2by2cube_dir.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
cube2=[[0 for j in range(8)] for i in range(6)]
cube=[[0 for j in range(8)] for i in range(6)]
def cubecopy():
for i in range(6):
for j in range(8):
cube[i][j]=cube2[i][j];
def cubecopy2():
for i in range(6):
for j in range(8):
cube2[i][j]=cube[i][j];
def changecorner(j,i) :
cube2[i[0][0]][i[0][1]]=cube[j[0][0]][j[0][1]];
cube2[i[1][0]][i[1][1]]=cube[j[1][0]][j[1][1]];
cube2[i[2][0]][i[2][1]]=cube[j[2][0]][j[2][1]];
def rotateclockwise(a,b,c,d) :
changecorner(d,a);
changecorner(a,b);
changecorner(b,c);
changecorner(c,d);
def rotatecounterclockwise(a,b,c,d) :
changecorner(d,a);
changecorner(a,b);
changecorner(b,c);
changecorner(c,d);
for i in range(6):
print(cube[i])
print()
for i in range(2):
for j in range(2):
cube[i][j+2]=1
cube[i+2][j]=2
cube[i+2][j+2]=3
cube[i+2][j+4]=4
cube[i+2][j+6]=5
cube[i+4][j+2]=6
cubecopy2();
for i in range(100000):
for i in range(6):
print(cube2[i])