Code Monkey home page Code Monkey logo

2048-cli's Introduction

2048-cli

A cli version/engine of the game 2048= for your Linux terminal.

Screenshot

There currently are 2 versions that can be run. This includes a straight-forward terminal based version and one using ncurses. To add a new graphical interface, simply create a .c file which implements all the functions in gfx.h and add a Makefile entry.

Get

git clone https://github.com/tiehuis/2048-cli.git
make

By default, termios.h is expected to be present for the standard terminal version, and a VT100 compatible terminal is being used. If a VT100 terminal is not available, simply alter the makefile and remove the '-DVT100' flag. Compiling with ncurses requires the development libraries for it.

On an ubuntu/debian machine for example, these can be obtained via

apt-get install libncurses5-dev

You can also also easily install this on el >= 5 (CentOS, RedHat Enterprise Linux, Scientific Linux, Oracle) and Fedora >= 19 using the package-manager:

sudo yum install 2048-cli[-nocurses]

For el you will need to have the EPEL-repository enabled.

Controls

hjkl and wasd  Default movement keys
q              Quit the current game

Options

-h             Print the program usage.
-H             Print the current highscore.
-C             Disable color support (default).
-c             Enable color support if supported.
-a             Enable animations (default).
-A             Disable animations.
-i             Enable ai without displaying game.
-I             Enable ai and display game.
-r             Reset highscore. Will prompt user.
-s SIZE        Set the size of the playing field.
-b RATE        Set the rate at which blocks spawn per turn.

License

This code is licensed under the MIT License.

2048-cli's People

Contributors

tiehuis avatar arbu avatar amdmi3 avatar matiasbian avatar paul-arutyunov avatar besser82 avatar bentley avatar christopherraa avatar fe051 avatar elsyspedromamede avatar

Stargazers

 avatar

Watchers

James Cloos avatar Fabio Z Tessitore 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.