Skip to content

Vadym-Lopatka/terminal-tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Tetris

A classic Tetris game for the terminal, written in Rust.

Rust License

Install & Run

git clone https://github.com/Vadym-Lopatka/terminal-tetris.git
cd terminal-tetris
cargo run --release

Controls

Action Keys
Move left A
Move right D
Soft drop S or J
Hard drop W or K
Rotate ↺ or H
Rotate ↻ or L
Quit ESC or Q

Configuration

Edit constants in src/main.rs:

const GRID_WIDTH: usize = 10;          // Board width
const GRID_HEIGHT: usize = 20;         // Board height
const PREVIEW_COUNT: usize = 4;        // Next pieces shown
const BASE_TICK_MS: u64 = 800;         // Initial speed
const MIN_TICK_MS: u64 = 100;          // Max speed
const LINES_PER_LEVEL: u32 = 10;       // Lines to level up

Scoring

Lines Points
1 100 × level
2 300 × level
3 500 × level
4 800 × level

Dependencies

About

Terminal-based Tetris game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages