hrd — the puzzle game: HuaRongDao
DescriptionRun the RuaRongDao game with the "pattern" if one is given at the command line, otherwise run the game with the default pattern. See the PATTERN section below for more information.
HuaRongDao is an ancient Chinese game. The rules are very easy to understand, but the game is not so easy to solve.
The aim of the game is to move pieces in order to free the largest one from the bottom side of the board, with as few steps as possible. You may not make one piece jump over another, nor can any two pieces overlap. Continuously moving one piece is counted as a single step.
UsageThe following commands are supported by this program.
- Mark the desired piece selected. The peice is then moved by one or two direction letter: l for LEFT, r for RIGHT, u for UP, or d for DOWN. Normally the arrow keys can also be used as the direction command.
- Quit the game.
- Undo one step.
- Redo one step.
- Save a bookmark. A single letter is prompted as the bookmark slot, valid bookmarks are a-z, A-Z, or 0-9.
- Load from a bookmark. A bookmark slot is prompted.
Ctrl-C can be used to cancel the current command. ENTER can be used to reset the prompt and echo area.
Ctrl-L can be used to redraw the screen.
PatternA pattern can be encoded as a string. Each grid of the board is encoded as a letter. Each row is followed by a dot.
- To indicate a big square.
- L R
- To indicate the left and the right of a horizontal rectangle respectively.
- T B
- To indicate the top and the bottom of a vertical rectangle respectively.
- To indicate a small square.
- To indicate an empty grid.
The dafault pattern can be encoded as TQQT.BQQB.TLRT.BPPB.P__P.
- The bookmark file.