diff options
Diffstat (limited to 'src/graphics.cpp')
| -rw-r--r-- | src/graphics.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 298fc43..2c8e525 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -134,6 +134,9 @@ void Graphics::handleEvent() case SDL_KEYDOWN: switch (e.key.keysym.sym) { + case SDLK_ESCAPE: + m_running = false; + break; case SDLK_UP: m_game.move(Game::DirectionUp); break; @@ -146,6 +149,12 @@ void Graphics::handleEvent() case SDLK_RIGHT: m_game.move(Game::DirectionRight); break; + case SDLK_BACKSPACE: + m_game.undo(); + break; + case SDLK_r: + m_game.reset(); + break; } if (m_game.won()) m_running = false; |
