• This repository has been archived on 18/May/2024
  • Stars
    star
    245
  • Rank 165,304 (Top 4 %)
  • Language
    C
  • License
    MIT License
  • Created over 10 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The game 2048 for your Linux terminal (https://github.com/gabrielecirulli/2048)

2048-cli

run on repl.it

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.

More Repositories

1

zig-regex

A regex implementation for the zig programming language
Zig
181
star
2

zig-rosetta

Rosettacode examples in zig
Zig
31
star
3

libhcs

A partially Homomorphic C library.
C++
31
star
4

zligc

libc implementation in zig
C
29
star
5

zig-lua

zig interfacing with lua example
C
24
star
6

zig-nng-example

Example of using nanomsg-next-generation with Zig
Zig
17
star
7

HeborisC7EX

A high speed puzzle action game
C++
16
star
8

nanopack

Lightweight Msgpack Encoder
C
15
star
9

zig-ryu

Zig port of https://github.com/ulfjack/ryu
Zig
15
star
10

zig-raytrace

simple raytracer in zig
Zig
14
star
11

zig-gameboy

A gameboy emulator in zig
Zig
13
star
12

zig-benchmarks-game

The Computer Language Benchmarks Game in Zig
C
12
star
13

zig-sdl2

SDL2 bindings for Zig
Zig
12
star
14

faststack

If you want to stack blocks kind of quick
C
10
star
15

zig-bn

big numbers for zig
Zig
8
star
16

zig-ctags

ctags definition for zig
8
star
17

zig-replace-c

5
star
18

zig-parsefloat

Float parsing library for Zig
Zig
5
star
19

zstack

Line-race tetris mode in Zig
Zig
5
star
20

tetrs

A Tetris Engine in Rust
Rust
4
star
21

quartic

Music Fundamentals Library
Rust
4
star
22

zig-dlmalloc

Work in progress port of dlmalloc-2.8.6 to Zig
C
4
star
23

zig-compiler-completions

bash and zsh completions for the zig compiler
Rust
4
star
24

euler

Solutions for
C
3
star
25

zig-simd-mem

std.mem rewrites using vectorization
Zig
3
star
26

ansiz

ansi escape code library for zig
3
star
27

QuickEdit

A (very) small editor for quick editing of large files.
C
3
star
28

Football-Fumble

Android game
Java
3
star
29

zig-docgen

documentation generator for zig
3
star
30

zig-notes

notes about the zig programming language
3
star
31

zig-deflate

DEFLATE implementation for zig
C
2
star
32

lwan-api-example

C
2
star
33

linguist-color-checker

Compares colors of linguist languages
Go
2
star
34

libhcs-voting

An example of a voting system using libhcs
C++
1
star
35

cihttp

Simple Case-Insensitive File Server
Go
1
star
36

zig-xxh3

XXH3 implementation in Zig
C
1
star
37

mpe

Tetris in C++17
C++
1
star
38

advent-of-code-2019

https://adventofcode.com/2019
Zig
1
star
39

dotfiles

Dotfiles
Python
1
star
40

mptet

Multiple-Precision Tetris
C
1
star
41

zig-cli-experiment

Experiment in how to handle the cli interface for zig
Shell
1
star
42

golfscript-rs

Golfscript Interpreter in Rust
Rust
1
star
43

chrono

Timing library in C
C
1
star
44

Snake

Play snake on the terminal
C
1
star
45

int_traits

Extended Traits for Rust Integer Types
Rust
1
star