Re:Show HN: A Terminal Tetris Game
by PetitPrince on Saturday March 13, 2021 @02:20AM
(#26444703)
Look up for tetrisconcept.net and theabsolute.plus discord ( https://discord.gg/6Gf2awJ ). Several people have made attempts to recreate sophisticated clones of Tetris, and the absolute plus leader board is written in rust.
Re:Show HN: A Terminal Tetris Game
by whateveracct on Saturday March 13, 2021 @12:23PM
(#26448056)
Does representing tetrominos that way make hit detection or anything like that easier? My gut says the only thing they add is slightly smaller memory usage, but maybe i'm missing some sort of elegant bit trick.
``` [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 1], [0, 0, 1, 1]] ```
Notice how the 1s form a square?
As I'm still learning Rust, any suggestions regarding the architecture, overall design of the game, more idiomatic code, etc., are very welcome.
If you want to play or just see how it turned out, check out:
https://github.com/adder46/tetris.rs