Template:Sokoban

From The Wiki Camp 2
Jump to navigation Jump to search

Conceptually based on: https://gist.github.com/rebane2001/a4d3e136ecf90ff05b044cb90dfcb6d6
I figured out the box pushing

Parameters

{{Sokoban|width|height|tile map|theme=<templatestyles src=Sokoban-THEME.css/>}}

The tile map works like a 5b tile map—one character per tile.

. air
/ wall
x box
* end
u player

Example

{{Sokoban|19|11|
..../////..........
..../.../..........
..../x../..........
..///..x//.........
../..x.x./.........
///././/./...//////
/..././/./////..**/
/.x..x..........**/
/////.///./u//..**/
..../...../////////
....///////........
}}
⬆️
⬇️
⬅️
➡️