Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

tetris

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

PasTetris

Classic Tetris game implemented in Pascal for DOS/UNIX terminals.

Features

  • Classic Tetris gameplay with all 7 tetrominoes
  • Clean DOS/UNIX terminal interface
  • Color support (auto-detected)
  • Scoring system with level progression
  • Pause/resume functionality
  • Cross-platform (Linux, FreeBSD, macOS, Windows)

Requirements

  • FreePascal compiler (fpc)
  • UNIX-like system or Windows with terminal support

Building

bash
make

Running

bash
make run
# or
./build/pastetris

Controls

  • A/D - Move left/right
  • W - Rotate piece
  • S - Soft drop
  • Space - Hard drop
  • P - Pause/Resume
  • Q/Esc - Quit
  • R - Restart (when game over)

Command Line Options

bash
./pastetris --help          # Show help
./pastetris --version       # Show version
./pastetris --color         # Force color output
./pastetris --no-color      # Disable colors
./pastetris --debug         # Enable debug mode
./pastetris --level 5       # Start at level 5

Scoring

  • Single line: 40 × level
  • Double line: 100 × level
  • Triple line: 300 × level
  • Tetris (4 lines): 1200 × level
  • Soft drop: +1 point per cell
  • Hard drop: +2 points per cell

Level increases every 10 lines cleared.

License

Licensed under the Apache License 2.0.

Author

AnmiTaliDev anmitali198@gmail.com
GitHub: https://github.com/AnmiTaliDev/tetris

File Structure

pascal
src/
????????? engine.pas  # Game logic and mechanics
????????? cli.pas     # Command line interface
????????? ui.pas      # Terminal user interface
????????? main.pas    # Main program entry point
Makefile        # Build system
README.md       # This file