UP

Function parity3


Definition

    ∇ Z←parity3 State;Corners;IP;M;∆TCNT
[1]  ⍝
[2]  ⍝⍝ compute cube parity (to detect illegal cube states)
[3]  ⍝
[4]  ∆TCNT←0 ◊ Corners←1 3 7 9 19 21 25 27
[5]  ⍝ Corner positions...
[6]  ⍝
[7]  IP←find_initial_pos¨⊂[2]State[Corners;]
[8]  State←State do_moves ('' 'f' 'L' 'UU' 'l' 'FF' 'LL' 'RRf')[   IP⍳1]
[9]  IP←find_initial_pos¨⊂[2]State[Corners;]
[10] State←State do_moves ('' 'br' 'r' 'DR' 'R' 'DDR' 'RR'    )[¯1+IP⍳3]
[11] IP←find_initial_pos¨⊂[2]State[Corners;]
[12] State←State do_moves ('' 'B'  'db' 'DDb' 'b' 'Db'        )[¯2+IP⍳7]
[13] IP←find_initial_pos¨⊂[2]State[Corners;]
[14] State←State do_moves ('' 'RDDr' 'bDB' 'Rdr' 'RDr'        )[¯3+IP⍳ 9]
[15] IP←find_initial_pos¨⊂[2]State[Corners;]
[16] State←State do_moves ('' 'd' 'D' 'DD'                    )[¯4+IP⍳19]
[17] IP←find_initial_pos¨⊂[2]State[Corners;]
[18] State←State do_moves ('' 'rDLdRDld' 'DLdrDldR'           )[¯5+IP⍳21]
[19] IP←find_initial_pos¨⊂[2]State[Corners;]
[20] State←State do_moves ('' 'lflLuufrbRDDrdLdrDldR'         )[¯6+IP⍳25]
[21] ⍝ Corner orientations...
[22] ⍝
[23] State←State do_moves M,M←⊃(State[ 1;]∈'OR')/'' 'fRDDrFUU' 'uufRddrF'
[24] State←State do_moves M,M←⊃(State[ 3;]∈'OR')/'' 'uuBrddRb' 'BrDDRbUU'
[25] State←State do_moves M,M←⊃(State[ 7;]∈'OR')/'' 'bbuRffrU' 'uRFFrUBB'
[26] State←State do_moves M,M←⊃(State[ 9;]∈'OR')/'' 'rrBdllDb' 'BdLLDbRR'
[27] State←State do_moves M,M←⊃(State[19;]∈'OR')/'' 'FrUURfDD' 'ddFruuRf'
[28] State←State do_moves M,M←⊃(State[21;]∈'OR')/'' 'ddbRuurB' 'bRUUrBDD'
[29] M←'' 'fDBdFDbRdlDrdLDLdrDldR' 'rDLdRDldlDRdLDrBdfDbdF'
[30] State←State do_moves M,M←⊃(State[25;]∈'OR')/M
[31] Z←∼State[Corners;]≡∆Initial_State[Corners;]
    ∇

Call Graph (defined functions called from function parity3)

Caller Graph (defined functions calling function parity3)