Skip to content
Tetris Implementation in C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Abduction II.ttf
Amerika Sans.ttf
Makefile
README
control_ncurses.c
control_ncurses.h
control_ncurses.o
control_sdl.c
control_sdl.h
control_sdl.o
display_ncurses.c
display_ncurses.h
display_ncurses.o
display_sdl.c
display_sdl.h
display_sdl.o
generate.c
generate.h
generate.o
pipe.c
pipe.h
pipe.o
test.c
tetris_ncurses
tetris_ncurses.c
tetris_ncurses.h
tetris_ncurses.o
tetris_sdl
tetris_sdl.c
tetris_sdl.h
tetris_sdl.o

README

This is a C implementation of the popular game Tetris.

Requirements: GCC, Ncurses (if using the terminal version, incomplete), SDL and SDL TTF library (if using the graphical version, recommended), libfreetype.

To get these on ubuntu, use the following command:

sudo apt-get install build-essential libncurses5-dev libsdl1.2-dev libsdl-ttf2.0-dev libfreetype6-dev

Once you have these libraries, simply type "make" in the tetris directory.

To play, run either the tetris_sdl or tetris_ncurses executables.

Controls:

Left, Right, and Down Arrows: Move piece
Up Arrow: Rotate piece
Space: Drop piece 
Q: Quit
You can’t perform that action at this time.