@hackage h20480.4.0.0

An Implementation of Game 2048

h2048

Build Status

A haskell implementation of Game 2048. Including:

  • a library for experimenting game strategies for Game 2048.
  • a simple program that provides the basic interaction with the game.
  • a CUI implemented using brick.

Based on 2048

Screenshots

Simple version

brick-based version

Build and run

With stack

h2048 comes with stack configuration, if you are building from source code, change directory to the project root and run:

stack build
# to run the brick version
stack exec -- h2048-brick
# to run the simple version
stack exec -- h2048-simple

With cabal

h2048 is now available on hackage.

If you have Cabal installed, you can use the following command to install this project:

cabal update
cabal install h2048

The binaries are h2048-simple for simple CUI version, h2048-brick for CUI version implemented using brick.

How to play

keys:

  • q: quit
  • i: up
  • k: down
  • j: left
  • l: right

If you are using h2048-brick, you can also use arrow keys.