Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A minimal terminal Tetris written in Zig

License

NotificationsYou must be signed in to change notification settings

ringtailsoftware/zigtris

Repository files navigation

A minimal terminal Tetris written in Zig. Tested with Zig 0.14.0

zig build run

Cursor keys to move, space to drop,q to quit.

I just want to play! don't make me install Zig

docker run --rm -it -v `pwd`:/app -w /app kassany/alpine-ziglang:0.13.0 zig build run

Run as a service via ssh

./run-as-service.shssh zigtris@localhost -p 2022

Notes

Some notes for anyone looking at the code:

  • Display is a thin wrapper on top of themibu terminal library, it provides a double buffered one pixel per character interface where it only redraws changed pixels on the buffer flip
  • Stage is the game stage and provides a square pixel interface on top ofDisplay (by printing two chars for each pixel)
  • Player holds theTetronimo shapes and movement logic
  • Debris holds the list of fallen blocks for hitchecking and completed line detection

License

MIT

About

A minimal terminal Tetris written in Zig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp