beleon / sokoban

Sokoban implemented in Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sokoban

An implementation of the classic Sokoban game in Haskell. The fully functioning prototype including one hardcoded map and a very simple terminal UI was build over the course of two train rides. Later a basic GUI was added using the awesome SDL2 Haskell bindings.

Acknowledgements

The free pixel art used for the game comes from these awesome artists:

The Dino Rush project was a very helpful reference that helped me make sense of the SDL2 Haskell bindings.

What works

  • Basic GUI
  • Complete game logic
  • Advancing to the next level

Not supported (yet)

  • Level selection
  • Undo move
  • Move counter
  • Game menu
  • Sound

Dependencies

  • stack
  • sdl2
  • sdl2-image

Installation

Clone the project, change into the root directory of the project and use

stack build && stack exec sokoban

to first build and then run Sokoban.

How to play

Use arrow keys or vim style keybindings to move. Press r to restart a level. Map will automatically change after successfully finishing a level.

Rules

Push all boxes on top of goals. Pulling boxes is not possible.

About

Sokoban implemented in Haskell

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%