Skip to content

Commit

Permalink
added readme, removed debugging tools from prod
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadon committed Oct 7, 2020
1 parent 0981b98 commit a01c380
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Tetris-rs

A Tetris game implemented in Rust, inspired by [a similar version written in C++](https://github.com/k-vernooy/tetris).
Big thanks to [k-vernooy](https://github.com/k-vernooy/tetris) for open-sourcing his work!
4 changes: 2 additions & 2 deletions src/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ impl Game {
self.screen.top();

mvprintw(9, 9, "Game over!");
mvprintw(10, 6, "Try again? (y/n/d)");
mvprintw(10, 6, "Try again? (y/n)");

loop {
match getch() {
N_CHAR => return false,
Y_CHAR => return true,
D_CHAR => {
D_CHAR if cfg!(debug_assertions) => {
let bbox = self.curr_shape.bounding_box();
mvprintw(
0,
Expand Down
3 changes: 1 addition & 2 deletions src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ pub static SCREEN_STR: &str = "
┃ ┃ ┃ ┃
┃ ┃ ┗━━━━━━━━━┛
┗━━━━━━━━━━━━━━━━━━━━┛
inspiration: k-vernooy/tetris ";
";
pub const NEXT_DISP_TL: Coord = Coord { row: 4, col: 29 };
pub const SCORE_DISP_TL: Coord = Coord { row: 11, col: 30 };
pub const LINES_DISP_TL: Coord = Coord { row: 17, col: 30 };
Expand Down

0 comments on commit a01c380

Please sign in to comment.