Skip to content

MisanthropicBit/terminal_blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Blocks GitHub license GitHub code size in bytes

A small 1341 sloc (as of 7daa3b) line Tetris clone that can be played in the terminal. Requires ncurses.

> cloc include/ src/
      19 text files.
      19 unique files.
       0 files ignored.

github.com/AlDanial/cloc v 1.80  T=0.12 s (159.6 files/s, 15912.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                9            283            134           1088
C/C++ Header                    10             77             59            253
-------------------------------------------------------------------------------
SUM:                            19            360            193           1341
-------------------------------------------------------------------------------

The game in action

Installing

Clone the repository and run make in the game's top-level directory. This creates the game executable terminal_blocks.

> git clone https://github.com/MisanthropicBit/terminal_blocks
> make
> ./terminal_blocks

To combat boredom, you can add the game's directory to your PATH.

PATH=$PATH:<path-to-terminal_blocks>

Or add an alias for the executable.

alias terminal_blocks="<path-to-terminal_blocks-executable>"

Controls

  • a: Move block left
  • d: Move block right
  • w: Move menu cursor up
  • s: Move block/menu cursor down
  • j: Rotate left
  • k: Rotate right
  • p: Play game (in menu) or pause/unpause game
  • g: Toggle guides for where the focus block will land
  • f: Confirm menu selection or drop block instantly to bottom
  • q: Quit menu or game

About

A Tetris clone you can play in your terminal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published