--- gforth/sokoban.fs 1995/11/27 18:37:07 1.2 +++ gforth/sokoban.fs 1998/05/02 21:28:43 1.4 @@ -28,7 +28,6 @@ Create maze 1 cells allot /maze 25 * al Variable mazes 0 mazes ! \ root pointer Variable soko 0 soko ! \ player position Variable >maze 0 >maze ! \ current compiled maze ->maze off \ score information @@ -119,6 +118,8 @@ Variable score 0 score ! \ total nu S" &." S" .&" r@ play-rule IF r> soko +! EXIT THEN S" &* " S" .&$" r@ play-rule IF r> soko +! 1 rocks +! -1 score +! EXIT THEN + S" &$." S" .@*" r@ play-rule + IF r> soko +! 1 rocks +! -1 score +! EXIT THEN -1 moves +! r> drop ; 1 move: soko-right