示例#1
0
文件: tables.py 项目: Arvonit/rubik
 def make_udslice_table(cls):
     udslice_move = [[0] * cls.MOVES for i in range(cls.UDSLICE)]
     a = CubieCube()
     for i in range(cls.UDSLICE):
         a.phase_1_ud_slice = i
         for j in range(6):
             for k in range(3):
                 a.edge_multiply(MOVE_CUBE[j])
                 udslice_move[i][3 * j + k] = a.phase_1_ud_slice
             a.edge_multiply(MOVE_CUBE[j])
     return udslice_move
示例#2
0
文件: tables.py 项目: Arvonit/rubik
 def make_flip_table(cls):
     flip_move = [[0] * cls.MOVES for i in range(cls.FLIP)]
     a = CubieCube()
     for i in range(cls.FLIP):
         a.phase_1_edge = i
         for j in range(6):
             for k in range(3):
                 a.edge_multiply(MOVE_CUBE[j])
                 flip_move[i][3 * j + k] = a.phase_1_edge
             a.edge_multiply(MOVE_CUBE[j])
     return flip_move
示例#3
0
文件: tables.py 项目: Arvonit/rubik
 def make_edge8_table(cls):
     edge8_move = [[0] * cls.MOVES for i in range(cls.EDGE8)]
     a = CubieCube()
     for i in range(cls.EDGE8):
         a.phase_2_edge = i
         for j in range(6):
             for k in range(3):
                 a.edge_multiply(MOVE_CUBE[j])
                 if k % 2 == 0 and j % 3 != 0:
                     edge8_move[i][3 * j + k] = -1
                 else:
                     edge8_move[i][3 * j + k] = a.phase_2_edge
             a.edge_multiply(MOVE_CUBE[j])
     return edge8_move