πŸ“¦ Sokoban-K β€” Forth Sokoban

Every move is recorded on the Forth stack, so undo can rewind without limit. A successful route can be saved as a new word and replayed.

How to play

Push every box β–£ onto a goal β—Ž. Use the arrow keys or WASD to move, Z to undo, or use the buttons. u d l r are movement words; undo rewinds one move.

Each stack letter records one move: lowercase means walking, uppercase means pushing a box. β€œSave route as a word” turns the stack into : solve-N … ;; its button then replays the route from the beginning.

The input accepts Forth: 3 for r next repeats, : name … ; defines a word, and \ starts a comment.