Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Restart game by pressing n in endgame screen
We can't use F5 in wasm.
  • Loading branch information
tomassedovic committed Dec 21, 2017
1 parent fdbc828 commit 0195b27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game.rs
Expand Up @@ -70,7 +70,7 @@ pub fn update(
}

// Restart the game on F5
if state.keys.matches_code(KeyCode::F5) {
if state.keys.matches_code(KeyCode::F5) || state.endgame_screen_visible && state.keys.matches_code(KeyCode::N) {
let state = State::new_game(
state.world_size,
state.map_size.x,
Expand Down
2 changes: 1 addition & 1 deletion src/render.rs
Expand Up @@ -243,7 +243,7 @@ fn render_endgame_screen(state: &State, drawcalls: &mut Vec<Draw>) {
"Longest High streak: {} turns",
state.player.longest_high_streak
);
let keyboard_text = "[F5] New Game [Q] Quit";
let keyboard_text = "[N] New Game [Q] Quit";

let longest_text = [
endgame_reason_text,
Expand Down

0 comments on commit 0195b27

Please sign in to comment.