rush hour for plan 9.
(see: http://en.wikipedia.org/wiki/Rush_Hour_%28board_game%29 )
help the red car (or glenda, when using faces visualization)
to go through the exit, by dragging the game elements with
mouse button 1. game elements and mouse cursor can also
be moved using cursor keys; space bar and escape key toggle
whether game elements or only mouse cursor is moved.
plan 9 rush hour consists of two applications:
- trafficfs, a level server that serves 'games' from ttraffic.levels, and
- rushhour, the the player gui.
the script rh.rc (to be installed in e.g. /rc/bin/rh) starts games/rushhour
(and games/trafficfs when not running already).
exiting rh (or rushhour) does not automatically make trafficfs exit.
the implementation of rushhour draws heavily on sokoban
with bits of memo thrown in for good measure.
the cars and trucks have been taken from
http://www.puzzles.com/products/RushHour/
the lib/levels/ttraffic.levels has been taken from
http://alpha.uhasselt.be/Research/Algebra/Members/pytraffic/
the other problems have been taken from the rush hour game
and rush hour card sets 2, 3 and 4.
(additional problems are welcome; should have a look
at pytraffics on-the-fly problem generator)
with the -f option, or after selecting 'faces' from button3 menu,
the visualization of the game elements uses the faces of memo.
the combination of colours and faces is coincidental,
in so far that the colors have been inspired by the rush hour game
(chosen to have enough 'distance' between the colors)
and the faces have been taken 'in order' from games/memo.
the faces visualization was the default in the first released version.
the files in src should go in /sys/src/games/rushhour
from these executable 'rushhour' should be built.
executable 'trafficfs' should be built from trafficfs.[ch]
(this is not automated now)
trafficfs parses the lib/levels/ttraffic.levels file and
serves its contents on (by default) /mnt/trafficfs,
and generates on request synthetic problem files.
trafficfs should be started before rushhour -
rushhour uses it to generate the levels for
the 'tt' b3 menu entries.
the files in lib should go in /sys/games/lib/rushhour
for fun (because of generality) the exit of the board
is no longer restricted to be at the right or bottom side,
nor is there a restriction on the number of exits.
[email protected]
|