From a01c380d35731a5f3b59bec21be2bf7ee97d3b58 Mon Sep 17 00:00:00 2001 From: Philippe Nadon Date: Wed, 7 Oct 2020 00:26:37 -0600 Subject: [PATCH] added readme, removed debugging tools from prod --- readme.md | 4 ++++ src/game.rs | 4 ++-- src/primitives.rs | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..396ebaf --- /dev/null +++ b/readme.md @@ -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! \ No newline at end of file diff --git a/src/game.rs b/src/game.rs index 9f6d877..fb94585 100644 --- a/src/game.rs +++ b/src/game.rs @@ -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, diff --git a/src/primitives.rs b/src/primitives.rs index 6c1b400..7754400 100644 --- a/src/primitives.rs +++ b/src/primitives.rs @@ -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 };