Giter VIP home page Giter VIP logo

haskoban's Introduction

haskoban

The classic game of Sokoban (倉庫番 sōko-ban, "warehouse keeper") written in Haskell.

Installation

Currently suppported platforms are Linux and MacOS. Installation requires the Haskell Stack build tool. To install Stack:

curl -sSL https://get.haskellstack.org/ | sh

To install Haskoban:

git clone https://github.com/peeley/haskoban.git
cd haskoban
stack build
stack install

If an error regarding file permissions is returned by the build or install command, pass the --allow-different-user flag or run as root.

Within the haskoban directory, simply run haskoban to start playing!

How to Play

As a warehouse keeper ('@'), your job is to organize the warehouse by sliding crates ('o') into their respective slots ('v'). Move your character using WASD, and push boulders by walking into them while their path is clear. The game is won when all the slots are filled.

Options & Custom Levels

All levels are stored in plaintext in the user's home directory at ~/.haskoban/levels. Custom levels can be written in the following format:

First line: Width of level in # tiles
Second line: Height of level in # tiles
Rest of file: level written out where each tile is represented as:
    '|' or '-' : wall
    '0' : crate
    '^' : slot
    '@' : player start position

To play a specific level, pass the --level or -l with the desired level filename as its argument. Currently, the levels are largely borrowed from the ASCII roguelike Nethack, which features a number of Sokoban-style puzzle levels. Contributions of custom level designs are greatly welcomed, and level sharing features are planned for the future.

haskoban's People

Contributors

peeley avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.