h2048: An Implementation of Game 2048

[ game, library, mit, program ] [ Propose Tags ] [ Report a vulnerability ]

An Implementation of Game 2048, based on https://github.com/gabrielecirulli/2048.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.2.0.1, 0.3.0.0, 0.4.0.0
Change log CHANGELOG.md
Dependencies base (>=4.12.0.0 && <4.13), brick (>=0.47.1 && <0.48), containers (>=0.6.0.1 && <0.7), h2048, mtl (>=2.2.2 && <2.3), text (>=1.2.3.1 && <1.3), tf-random (>=0.5 && <0.6), vector (>=0.12.0.3 && <0.13), vector-algorithms (>=0.8.0.1 && <0.9), vty (>=5.25.1 && <5.26) [details]
License MIT
Author Javran Cheng
Maintainer Javran.C@gmail.com
Category Game
Home page https://github.com/Javran/h2048#readme
Bug tracker https://github.com/Javran/h2048/issues
Source repo head: git clone https://github.com/Javran/h2048
Uploaded by javran at 2019-10-30T04:36:17Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables h2048-simple, h2048-brick
Downloads 4338 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-10-30 [all 1 reports]

Readme for h2048-0.4.0.0

[back to package description]

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.