-
Notifications
You must be signed in to change notification settings - Fork 1
Executing Moves
Akshath Raghav edited this page Jul 5, 2021
·
8 revisions
Make sure that the input is separated by spaces, otherwise, Cubot will not execute the moves.
Cubot cube = new Cubot(true) ;
System.out.println("Cube state == Solved ? --> " + cube1.isSolved());
System.out.println("------------------------------------------");
System.out.println("Moves Carried Out by stringalg() : " + cube1.stringalg("R U R' U'") );
System.out.println("------------------------------------------");
System.out.println("Cube state == Solved ? --> " + cube1.isSolved());
--> reverses all the moves done ( s represents the moves executed ) if check
is true, returns reversed String otherwise
Make sure that the input is separated by spaces, otherwise, Cubot will not execute the moves.
Cubot cube = new Cubot(true);
String s = "R U R' U'" ;
System.out.println("Moves : " + cube.reverseAlg(s, false)) ; // just reverses it
System.out.println("Cube State : " + cube.isSolved());
System.out.println();
System.out.println("Moves : " +cube.reverseAlg(s, true)) ; // just reverses it
System.out.println("Cube State : " + cube.isSolved());
Read on to see Cubot in action