rubik

rubikJulien Cervelle [x]

Rubik proglet help.

This proglet allows to learn bottom-up algorithm design: from basic tasks (turn one face of the cube), the student has to build more complex function to allows to solve easily the rubik's 2x2 cube.
The availables functions are divided into two categories. The first one turn one of the six face of the cube, clockwise or anticlockwise. The second category changes the view of the cube, as do the buttons above the view window
Note that the difference between button and programatic actions is that pushing a button causes immediate turn of the cube while programmed actions are performed in the order the functions are called
Note also that when a face (for instance front face) is programmed to be turned, moving the view with a button (for instance clicking the down arrow button) do not change the face programmed to be turned (if the front face was programmed to be turned, after the click, the new place of the front face i.e. the bottom face will turned).
  • left(), right(), up(), down(), back() and front() functions rotate the corresponding face clockwise;
  • antileft(), antiright(), antiup(), antidown(), antiback() and antifront() functions rotate the corresponding face anti-clockwise;
  • moveup(), movedown(), moveleft() and moveright() functions move the view of the cube rotating it in the direction of the function name. For instance, moveup() turns the cube upward in order to view the down face;
  • rotate() and antirotate functions rotate the cube clockwise or anti-clockwise;
  • randomturn() rotates a random face. The function can be used to scramble the cube.
All these functions are available through completion.