diff options
| author | Ian C <ianc@noddybox.co.uk> | 2017-05-19 11:03:26 +0000 | 
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2017-05-19 11:03:26 +0000 | 
| commit | fead7bcc5a80c61d13cb4206468b15fa0d418b18 (patch) | |
| tree | a8f4896c6b0f9351d8cd734afbdbeb28fd9b4b7e | |
| parent | 47d2ee2d01eb01c8234fddfd1ea895c1780d728e (diff) | |
Added README
| -rw-r--r-- | README | 66 | ||||
| -rw-r--r-- | dbox.c | 2 | ||||
| -rw-r--r-- | mktar | 2 | 
3 files changed, 68 insertions, 2 deletions
| @@ -0,0 +1,66 @@ +BUILDING +-------- +To build just run 'make'.  + + +DESCRIPTION +----------- + +dbox is a simple brute-force Sokoban level solver.  Usage is: + +dbox [-v|-i|-p|-P] file [file2 ...] + +-v	- Be verbose.  Print depth of search tree as searching is done. +-i	- Interactive.  Show an interactive version of the map once solved. +-P\-p	- Play.  Allows you to play the level. + +The file is a Sokoban level defined like this: + + +Level 1 +  ###    +  #.#    +  # #### +###B B.# +#. B@### +####B#   +   #.#   +   ###   + +The first line is the title of the level. + +The subsequent lines must all be of the same width and define the level.  The +'#' character defines a wall.  The 'B' character defines a box.  The '.' +character defines a target square.  The 'X' character can be used to define a +box already on a target square. + +If no interactive mode is used the level will be displayed along with the +route to solve it, e.g. + +Solving Level 1 + +  ###    +  #.#    +  # #### +###B B.# +#. B@### +####B#   +   #.#   +   ###   + +Route = 'DULLRUUDRR' + + +INTERACTIVE MODE KEYS +--------------------- + +In interactive mode the following keys can be used. + +P		- Follow the solution path if one was found. +Backspace/B	- Step back one move on the solution path. +Cursor Keys	- Move.  Note that the move will be blocked if the state of the +		  map is already known or moving a block will make the level +		  insoluble. +Q		- Quit. + +Cursors to move, P to follow path, Q to quit, Backspace/B to step back @@ -1,7 +1,7 @@  /*      dbox - Sokoban level solver -    Copyright (C) 2001-2009  Ian Cowburn (ianc@noddybox.demon.co.uk) +    Copyright (C) 2001-2009  Ian Cowburn (ianc@noddybox.co.uk)      This program is free software; you can redistribute it and/or modify      it under the terms of the GNU General Public License as published by @@ -3,7 +3,7 @@  FILE=dbox.tar.gz  make clean -tar cvfz $FILE level* sok* net* Makefile mktar *.c +tar cvfz $FILE level* sok* net* Makefile mktar *.c README  if [ `uname` != "Linux" ] ;  then | 
