Skip to content

Scrambling

Akshath Raghav edited this page Jul 4, 2021 · 2 revisions

getScramble(int n, boolean check)

--> gives you a scramble of length n ( and executes it on the cube if check is true, just gives a scramble if check is false )

Cubot cube = new Cubot(true) ;
System.out.print(cube);
String s = cube.getScramble(10, true);
System.out.println("---------------------------------------");
System.out.println("Scramble :" +  s);
System.out.print(cube);
System.out.println("---------------------------------------");
System.out.println("Undoing scramble with : " + cube.reversealg(s, true)) ; // undoes s
System.out.println("cubeState : " + cube.isSolved()); // --> true

example