diff --git a/src/main.rs b/src/main.rs index 45ef5bb..bce68d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -233,10 +233,14 @@ impl App { match self.state { Gamestate::Playing => { let canvas = Canvas::default() - .block(Block::bordered().title(format!( - " PongRS | {} - {} ", - self.player_score, self.enemy_score - )).title_alignment(Alignment::Center)) + .block( + Block::bordered() + .title(format!( + " PongRS | {} - {} ", + self.player_score, self.enemy_score + )) + .title_alignment(Alignment::Center), + ) .x_bounds([X_BOUNDS.0, X_BOUNDS.1]) .y_bounds([Y_BOUNDS.0, Y_BOUNDS.1]) .marker(Marker::Block) @@ -330,6 +334,7 @@ impl App { Gamestate::Won => self.restart(), Gamestate::Lost => self.restart(), }, + (_, KeyCode::Char('r')) => self.restart(), _ => {} } }