Skip to content

Martan03/2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048

2048 game implemented in terminal in Rust 🦀

image

Contents

Installation

You have to compile it yourself, but that shouldn't be a problem. Only thing you need is cargo:

cargo build -r

After its done compiling, you can start it in ./target/release/tui2048

Usage

Start 2048 game:

./tui2048

Detailed description

Game goal

If you don't know what 2048 game is, your goal is to get tile with 2048 value. In order to get one, you need to combine tiles with the same value. Combining tiles is really easy. When they're next to each other, you can "push" them together and they will join to one tile with value equal to their sum.

Joining tiles

You can use arrow keys to move all tiles in corresponding direction (for example, up arrow will move all tiles up as much as possible). When two tiles with the same value are next to each other in the corresponding direction, they will join and therefore you get one with greater value.

Game end

I already mentioned the goal of the game - getting tile with value of 2048 - but what can also happen is that you fill the whole board and you can't join any tiles. This is game over. You can then restart the game with r key.

Controls

  • Arrow keys: moving tiles
  • Esc / q: exits the game
  • r: restarts the game

Technologies

I used these libraries:

Links

About

2048 TUI implementation in Rust 🦀

Topics

Resources

Stars

Watchers

Forks

Languages