Listing 7 SUB Corners1 'Rotate cube about vertical to 4 positions. 'At each, note correct u/f/r, find it (8 poss. 'locations) and moves it to d/f/r initially. PrStr "Top layer corners", 3: uc = c(1,2,2) FOR n = 1 TO 4: fc = c(5,2,2): rc = c(4,2,2) 'U & F & R centre colours. u/f/r corner 'must have same 3 colours, i, j & k. 'Even if u/f/r is correct , move it to d/f/r i = c(1, 3, 1):j = c(5, 1, 3):k = c(4, 3, 3) IF i = uc OR j = uc OR k = uc THEN '|copy IF i = fc OR j = fc OR k = fc THEN '| IF i = rc OR j = rc OR k = rc THEN '| PrStr "Move u/f/r to d/f/r ", 4 PrStr "ie. R-1DR ", 5 Rotpr 4, 3: Rotpr 2, 1: Rotpr 4, 1 END IF '|copy END IF '| END IF '| 'if u/b/r is correct u/f/r, move it to d/f/r i = c(1, 3, 3):j = c(6, 1, 3):k = c(4, 3, 1) 'copy 3 IF statements PrStr "Move u/b/r to d/f/r ", 4 PrStr "ie. B-1D-1B ", 5 Rotpr 6, 3: Rotpr 2, 3: Rotpr 6, 1 'copy 3 END IFs 'if u/b/l is correct u/f/r, move it to d/f/r i = c(1, 1, 3):j = c(6, 3, 3):k = c(3, 3, 1) 'copy 3 IF statements PrStr "Move u/b/l to d/f/r ", 4 PrStr "ie. L-1D2L ", 5 Rotpr 3, 3: Rotpr 2, 2: Rotpr 3, 1 'copy 3 END IFs 'if u/f/l is correct u/f/r, move it to d/f/r i = c(1, 1, 1):j = c(5, 1, 1):k = c(3, 1, 1) 'copy 3 IF statements PrStr "Move u/f/l to d/f/r ", 4 PrStr "ie. LDL-1 ", 5 Rotpr 3, 1: Rotpr 2, 1: Rotpr 3, 3 'copy 3 END IFs 'if d/b/r is correct u/f/r, move it to d/f/r i = c(2, 1, 1):j = c(6, 1, 1):k = c(4, 1, 1) 'copy 3 IF statements PrStr "Move d/b/r to d/f/r ", 4 PrStr "ie. D-1 ", 5 Rotpr 2, 3 'copy 3 END IFs 'if d/b/l is correct u/f/r, move it to d/f/r i = c(2, 1, 3):j = c(6, 3, 1):k = c(3, 3, 3) 'copy 3 IF statements PrStr "Move d/b/l to d/f/r ", 4 PrStr "ie. D2 ", 5 Rotpr 2, 2 'copy 3 END IFs 'if d/f/l is correct u/f/r, move it to d/f/r i = c(2, 3, 3):j = c(5, 3, 1):k = c(3, 1, 3) 'copy 3 IF statements PrStr "Move d/f/l to d/f/r ", 4 PrStr "ie. D ", 5 Rotpr 2, 1 'copy 3 END IFs '--------- u/f/r cube now at d/f/r. ---------- '--------- So move to it to u/f/r ---------- PrStr "Move d/f/r to u/f/r ", 4 IF c(2, 3, 1) = uc THEN 'if uc colour on D 'face, it must be moved to R face PrStr "ie. R-1DRD2 ", 5 Rotpr 4,3: Rotpr 2,1: Rotpr 4,1: Rotpr 2, 2 END IF IF c(5, 3, 3) = uc THEN 'if uc colour on F PrStr "ie. FDF-1 ", 5 Rotpr 5,1:Rotpr 2,1: Rotpr 5,3 'move to u/r END IF IF c(4, 1, 3) = uc THEN 'if uc colour on R PrStr "ie. R-1D-1R ", 5 Rotpr 4,3:Rotpr 2,3: Rotpr 4,1 'move to u/r END IF IF n < 4 THEN RotCube NEXT n PrStr blank, 3:PrStr blank, 4 PrStr blank, 5:PrStr blank, 6 END SUB -------------------- End of Listing 7