Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ impl Ui {
"movement: hjkl / ← ↓ ↑ →",
"expose tile: spacebar",
"flag tile: f",
"restart: r",
"quit: q",
],
':',
Expand All @@ -402,7 +403,7 @@ impl Ui {
let info_text_split_rects = Layout::default()
.direction(Direction::Vertical)
.constraints(vec![
Constraint::Min(vertical_pad_block_height - 3),
Constraint::Min(vertical_pad_block_height.saturating_sub(3)),
Constraint::Length(3),
])
.split(middle_mines_rects[0]);
Expand Down Expand Up @@ -520,6 +521,10 @@ impl Ui {
app.expose_all()?;
}
}
Key::Char('r') => {
app = App::new(Board::new(rows, columns, mines)?);
lost = false;
}
Key::Char('q') => break,
_ => {}
}
Expand Down