The h2048 package

[Tags: library, mit]

A haskell implementation of Game 2048, based on

[Skip to ReadMe]


Dependenciesbase (==4.*), MonadRandom (==0.*), mtl (==2.*), text (==1.*), transformers (==0.*), vty (==5.*), vty-ui (>=1.8 && <2) [details]
CopyrightCopyright (c) 2014 Javran Cheng
AuthorJavran Cheng
Home page
Executablesh2048-vty, h2048-simple
UploadedFri Nov 7 18:27:58 UTC 2014 by javran
Downloads670 total (30 in last 30 days)
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]




exebuild executablesEnabledAutomatic
vtybuild UI written in vty-uiEnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainers' corner

For package maintainers and hackage trustees

Readme for h2048-


Build Status

A haskell implementation of Game 2048. Including:

Based on 2048


Simple CLI version

vty CLI version

Build and run

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 CLI version, h2048-vty for CLI version implemented using vty-ui.


If you just want the functionality of this library, you can turn off flag exe. If you have trouble building the vty CLI version, you can try to turn off flag vty.

An example for turning off flag vty:

# if you are installing package from hackage:
cabal install --flag="-vty"

# or if you are building from the github repo
cabal configure --flag="-vty"
cabal build

Without cabal

First make sure the following dependencies are installed:

In addition, if you want to play with vty CLI version, the following dependencies are also required:

You can use following commands to run the program without cabal:

cd src # assume your working directory is the project home.
# to play the simple CLI version
runhaskell MainSimple.hs
# to play the vty CLI version
runhaskell MainVty.hs

How to play


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