Skip to content
/ tetris Public

Play Tetris from the comfort of your terminal!

Notifications You must be signed in to change notification settings

alwedo/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

197 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Tetris

GitHub go.mod Go version Test Latest Release

Play Tetris from the comfort of your terminal!

example

⚠️ this assumes you know how to use the terminal! If you don't you can find out how here.

Install

For Apple computers with ARM chips you can use the provided installer. For any other OS you'll have to compile the binary yourself.

ARM (Apple Silicon)

Open the terminal and run:

curl -sSL https://raw.githubusercontent.com/alwedo/tetris/main/bin/install.sh | bash
  • You'll be required to enter your admin password.
  • You might be required to allow the program to run in the System Settings - Privavacy & Security tab.

Compiling the binary yourself

  1. Install Go
  2. Clone the repo git clone git@github.com:alwedo/tetris.git
  3. CD into the repo cd tetris
  4. Run the program make run-tetris

Multiplyer

Yes, Terminal Tetris allows you to battle your way out against another person! Every time you complete a line, the opponent's speed will increase by one level, creating a fast-paced multiplayer experience.

Tetris server is a minimalistic server implementation that uses gRPC bidirectional streaming to allow clients to play tetris against each other.

Connect to my own server (while it last)

tetris -address="52.50.114.171" -name="your_name"

Create your own server

You can either run the server in your local host:

make run-server

Or you can run it inside of a container:

make docker-build

The server will listen to TCP connections over the port 9000. How to expose the port for others to join you locally is beyond the scope of this document. However you can look at tools like ngrok.

Options

Disables Ghost piece.

tetris -noghost

Enables debug logs into ~/.tetrisLog.

tetris -debug

Prints current version.

tetris -version

Sets player's name for Online mode.

tetris -name="YOUR_NAME"

Sets the server address for Online mode.

tetris -address="YOUR_SERVER_ADDRESS"