All Projects → mevdschee → 2048.c

mevdschee / 2048.c

Licence: mit
Console version of the game "2048" for GNU/Linux

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to 2048.c

Picocli
Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
Stars: ✭ 3,286 (+625.39%)
Mutual labels:  cli, command-line, ansi-colors
Beats
A command-line drum machine. Convert a beat notated in YAML into a *.wav file.
Stars: ✭ 389 (-14.13%)
Mutual labels:  cli, command-line
Kondo
Save disk space by cleaning non-essential files from software projects.
Stars: ✭ 373 (-17.66%)
Mutual labels:  cli, command-line
Cobra
A Commander for modern Go CLI interactions
Stars: ✭ 24,437 (+5294.48%)
Mutual labels:  cli, command-line
Sad
CLI search and replace | Space Age seD
Stars: ✭ 350 (-22.74%)
Mutual labels:  cli, command-line
Reminders Cli
A simple CLI for interacting with macOS reminders
Stars: ✭ 354 (-21.85%)
Mutual labels:  cli, command-line
Triage
Interactive command-line GitHub issue & notification triaging tool.
Stars: ✭ 394 (-13.02%)
Mutual labels:  cli, command-line
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (-26.05%)
Mutual labels:  cli, command-line
Cocona
Micro-framework for .NET Core console application. Cocona makes it easy and fast to build console applications on .NET Core.
Stars: ✭ 398 (-12.14%)
Mutual labels:  cli, command-line
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (+839.29%)
Mutual labels:  cli, command-line
Args
Toolkit for building command line interfaces
Stars: ✭ 399 (-11.92%)
Mutual labels:  cli, command-line
Gandi.cli
command line interface to Gandi.net products using the public API
Stars: ✭ 349 (-22.96%)
Mutual labels:  cli, command-line
Gulp Cli
Command Line Interface for gulp.
Stars: ✭ 347 (-23.4%)
Mutual labels:  cli, command-line
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-23.84%)
Mutual labels:  cli, command-line
Cmd2
cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
Stars: ✭ 342 (-24.5%)
Mutual labels:  cli, command-line
Pipupgrade
🗽 Like yarn outdated/upgrade, but for pip. Upgrade all your pip packages and automate your Python Dependency Management.
Stars: ✭ 391 (-13.69%)
Mutual labels:  cli, command-line
Promptui
Interactive prompt for command-line applications
Stars: ✭ 4,621 (+920.09%)
Mutual labels:  cli, command-line
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+4282.12%)
Mutual labels:  cli, command-line
Go Tea
Tea provides an Elm inspired functional framework for interactive command-line programs.
Stars: ✭ 329 (-27.37%)
Mutual labels:  cli, command-line
Mri
Quickly scan for CLI flags and arguments
Stars: ✭ 394 (-13.02%)
Mutual labels:  cli, command-line

2048.c

run on repl.it

Spanish

screenshot

Console version of the game "2048" for GNU/Linux

Gameplay

You can move the tiles in four directions using the arrow keys: up, down, left, and right. All numbers on the board will slide into that direction until they hit the wall and if they bump into each other then two numbers will be combined into one if they have the same value. Each number will only be combined once per move. Every move a new number 2 or 4 appears. If you have a 2048 on the board you have won, but you lose once the board is full and you cannot make a move.

Requirements

  • C compiler

Tested on: GNU/Linux, FreeBSD, OpenBSD

Installation

wget https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c
gcc -o 2048 2048.c
./2048

Running

The game supports different color schemes. This depends on ANSI support for 88 or 256 colors. If there are not enough colors supported the game will fallback to black and white (still very much playable). For the original color scheme run:

./2048

For the black-to-white color scheme (requires 256 colors):

./2048 blackwhite

For the blue-to-red color scheme (requires 256 colors):

./2048 bluered

Contributing

Contributions are very welcome. Always run the tests before committing using:

$ ./2048 test
All 13 tests executed successfully
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].