sokoban.vim : Sokoban Game for Vim!
| script karma
Downloaded by 7907
Comments, bugs, improvements
script versions (upload new version)
|The goal of VimSokoban is to push all the packages ($) into the home area (.) of each level using hjkl keys or the arrow keys.
The arrow keys move the player (X) in the corresponding direction, pushing a package if it is in the way and there is a clear
space on the other side.
:Sokoban - or - :Sokoban <level num> (no split window)
:SokobanH - or - :SokobanH <level num> (horizontal split window)
:SokobanV - or - :SokobanV <level num> (vertical split window)
commands to start the game
h or <Left> - move the man left
j or <Down> - move the man down
k or <Up> - move the man up
l or <Right> - move the man right
r - restart level
n - next level
p - previous level
u - undo move
Levels came from the xsokoban distribution which is in the public domain.
Take a look at VIM Tetris (vimscript#172) too....the game which started the VIM Game revolution :)
|Run `tar -zxf VimSokoban.tar.gz`, this will unpack the installation into the VimSokoban directory. Contained in that directory
are the levels and the sokoban.vim script. Simply add sokoban.vim to your favorite vim plugin directory or source it directly.
The directory containing the levels is found as follows,
1) if g:SokobanLevelDirectory is set that directory is used
2) if $VIMSOKOBANDIR is set that directory is used
3) if $HOME/VimSokoban exists it is used
4) on WINDOWS, if c:\\VimSokoban exists it is used
5) if a VimSokoban directory exists below the directory where the script lives exists it is used. (this means that if sokoban.vim
is in your plugin directory you can put the levels into a directory called VimSokoban in your plugin directory)
6) Finally, the directory where the script lives is considered. (this means that if you have the levels and the sokoban.vim
script in the same directory it should be able to find the levels)
(when setting g:SokobanLevelDirectory or $VIMSOKOBANDIR make sure that it contains a trailing / or \ (unix/windows).
You will need a VIM window which is 80 characters wide and about 35 lines.
Click on the package to download.
ip used for rating: 126.96.36.199