Skip to content

Tetris clone for terminals using python3 and ncurses

Notifications You must be signed in to change notification settings

acarcher/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris Clone

A tetris terminal game written in Python 3 using the builtin curses module (a Python wrapper for the C ncurses library). I focused on object-oriented programming and having clean easy-to-read code spread over multiple files/modules.

Demo

Getting Started

Prerequisites

Python >=3.5.2

Config

The config.py file contains global variables DEBUG and SPEED. DEBUG turns debugging mode on and off, while SPEED controls the initial period length (difficulty) of the game.

Running the program

To run the program, type:

python3 main.py

For best results, use Ubuntu's GNOME terminal and a monospace font.

Monospace font can be achieved by:

> open terminal
> edit profile preferences
> general tab
> tick custom font
> monospace font of your choice (I used monospace regular in 12pt)

Controls

Directional keys:

  • right, left, down move the piece in that direction
  • up rotates the piece clockwise

q/y/n:

  • q quits at any time
  • y/n allow continuing or quitting after a loss

About

Tetris clone for terminals using python3 and ncurses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages