The h2048 package

[ Tags: game, library, mit ] [ Propose Tags ]

a haskell implementation of Game 2048, based on https://github.com/gabrielecirulli/2048.


[Skip to Readme]

Properties

Versions 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.2.0.1
Dependencies base (==4.*), MonadRandom (==0.*), mtl (==2.*), text (==1.*), transformers (==0.*), vty (==4.*), vty-ui (==1.*) [details]
License MIT
Copyright Copyright (c) 2014 Javran Cheng
Author Javran Cheng
Maintainer Javran.C@gmail.com
Category Game
Home page https://github.com/Javran/h2048
Uploaded Mon Mar 24 12:49:00 UTC 2014 by javran
Distributions NixOS:0.2.0.1
Executables h2048-vty, h2048-simple
Downloads 1004 total (18 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-18 [all 5 reports]
Hackage Matrix CI

Modules

  • System
    • Game
      • H2048
        • System.Game.H2048.Core
        • System.Game.H2048.Utils

Flags

NameDescriptionDefaultType
exe

build executables

EnabledAutomatic
vty

build UI written in vty-ui

EnabledAutomatic

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

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for h2048-0.1.0.1

[back to package description]

h2048

Build Status

a haskell implementation of Game 2048

Based on 2048

Screenshots

Simple CLI version

vty CLI version

Build and run

With cabal

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

cabal build

The executable will be located at dist/build/h2048-simple/h2048-vty, to run the program:

./dist/build/h2048-simple/h2048-vty

Or alternatively:

cabal run h2048-vty

If you have trouble building the vty CLI version, you can try to turn off feature vty and use h2028-simple:

cabal configure --flag="-vty"
cabal build
# now the program should be ready
cabal run h2048-simple
# or alternatively:
./dist/build/h2048-simple/h2048-simple

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

keys:

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

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