diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index e5a8d04..2cf1b23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -206,7 +206,7 @@ impl Default for Game { field: Field::default(), figure: Figure::kind_random(), x: 3, - y: 18, + y: 17, fall_timeout: Timeout::from_duration(std::time::Duration::from_millis(500)), place_timeout: None, } @@ -217,7 +217,7 @@ impl Game { fn place_figure(&mut self) { self.field.render(&self.figure, self.x, self.y); self.figure = Figure::kind_random(); - (self.x, self.y) = (3, 18); + (self.x, self.y) = (3, 17); self.stop_place_timeout(); for line in 0..FIELD_ROWS - 1 { while self.field.is_line_complete(line) { @@ -322,15 +322,16 @@ impl Game { fn print_field(field: &Field) { cursor_to_home(); for y in 0..FIELD_ROWS_VISIBLE { + print!("|"); for x in 0..FIELD_COLS { let c = field.cells[(FIELD_ROWS_VISIBLE - 1 - y) * FIELD_COLS + x]; if c == 0 { - print!(". "); + print!(" "); } else { print!("██"); } } - print!("\r\x1b[1B"); + print!("|\r\x1b[1B"); } } |