index : snake-rs
An implementation of the classic Snake game in Rust using SDL2
about summary refs log tree commit diff

Diffstat (limited to 'src/app.rs')

-rw-r--r-- src/app.rs 16
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/app.rs b/src/app.rs
index b7e1cf3..1447afe 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -70,17 +70,17 @@
                            },
                            _ => {}
                        },
                        GameState::Paused => match keycode {
                            Keycode::Q => break 'running,
                            _ => {}
                        },
                        GameState::GameOver => match keycode {
                            Keycode::R => {
                        GameState::Paused => {
                            if keycode == Keycode::Q {
                                break 'running;
                            }
                        }
                        GameState::GameOver => {
                            if keycode == Keycode::R {
                                self.change_state(GameState::Playing);
                                self.game_context.restart();
                            }
                            _ => {}
                        },
                        }
                    },
                    _ => {}
                }