Skip to content
/ Tetris Public

First year project. Tetris in ncurses.

License

Notifications You must be signed in to change notification settings

antwxne/Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris c c

The goal of this project is to recreate the Tetris game in a UNIX terminal, with the Gameboy version rules. You have to use ncurses.

Preview

game preview

Requirements

Ncurses library

To install ncurses library please refer to the installation guide

Build and run

Linux:

make
./tetris

Usage:

./tetris --help
Usage: ./tetris [options]
Options:
--help Display this help
-L --level={num} Start Tetris at level num (def: 1)
-l --key-left={K} Move the tetrimino LEFT using the K key (def: left arrow)
-r --key-right={K} Move the tetrimino RIGHT using the K key (def: right arrow)
-t --key-turn={K} TURN the tetrimino clockwise 90d using the K key (def: top
arrow)
-d --key-drop={K} DROP the tetrimino using the K key (def: down arrow)
-q --key-quit={K} QUIT the game using the K key (def: ‘q’ key)
-p --key-pause={K} PAUSE/RESTART the game using the K key (def: space bar)
--map-size={row,col} Set the numbers of rows and columns of the map (def: 20,10)
-w --without-next Hide next tetrimino (def: false)
-D --debug Debug mode (def: false)

Tetriminos shapes are in tetriminos folder.

Example:

2 3 6
 *
**
*

2 = width

3 = height

6 = color

Contributors

  • Clément Ruat github-link

  • Antoine Desruet github-link