Skip to content

LowLevelLoser/ncurses_tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ncurses_tetris

A simple Tetris clone written in C using the ncurses library that feels better than other terminal Tetris games I've tried.

⌨️ Controls

Key Action
Rotate piece
← / → Move left / right
Soft drop (move down)
Space Hard drop
C Hold / switch piece
Esc Pause
R Restart

Dependencies

You need:

  • A C compiler (GCC or Clang)
  • The ncurses development headers

Install on different distros

Debian / Ubuntu:

sudo apt install gcc make libncurses5-dev libncursesw5-dev

Arch Linux:

sudo pacman -S base-devel ncurses

Fedora:

sudo dnf install gcc make ncurses-devel

Void Linux:

sudo xbps-install -S base-devel ncurses

Building

Clone the repo and run:

Clone and build:

git clone https://github.com/LowLevelLoser/ncurses_tetris
cd ncurses_tetris
make

This builds the executable tetris.


Installing

To install globally (into /usr/local/bin/tetris):

sudo make install

To uninstall:

sudo make uninstall

You can change the prefix if you don’t want to install into /usr/local:

make PREFIX=$HOME/.local install

This will place tetris in ~/.local/bin.


Running

If installed system-wide:

tetris

If running directly from the repo:

./tetris

About

tetris on the terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published