sponsor Vim development Vim logo Vim Book Ad

rubikscube.vim : a rubik's cube game in vim script

 script karma  Rating 31/16, Downloaded by 1949  Comments, bugs, improvements  Vim wiki

created by
olivier vermersch
 
script type
game
 
description
Commands:    

- u, d, l, r, f, b to turn up, down, left, right, front and back faces clockwise (whatever cube orientation)
- c, m, v to turn the three belts clockwise
- shift + letter for turning counterclockwise - ctrl + letter for half turn
- the whole cube can turn with the four arrows and Pgup/Pgdown keys
- sramble cube with s key, reset it with S

TODO:
- more configurable display
- add some edit technique with a solver algorithm - in order to solve a real cube :-)
- chrono + high score stuff
- support for 4x4 and 5x5 cubes
- write moves in letters when done
- some optimization (seems to be slow on old or "slow networked display" machines)
- etc.
 
install details
Source the file in an empty buffer.

Use preferably the gui, for colors. This should work with gvim version > 6.1 (apparently cursor() fonction is not present on earlier versions)

Version used for development is 6.3.4

**** SAVE EVERYTHING BEFORE DOING IT ****
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
rubikscube.vim v0.2 2005-05-16 6.0 olivier vermersch v0.2:
- scramble/reset key
- possibility to rotate the whole cube
- simplified display
- now use the up/down/left/right/back/front convention for move keys
- belt moves (c, m, v)
- magenta color instead of lightred for orange face
- use "normal!" instead of unset mappings for display
rubikscube.vim 0.1 2005-05-03 6.0 olivier vermersch Initial upload
ip used for rating: 3.17.79.60

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github