From 9401116d59066a2bb6de9c12d9642afee1069314 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 21 Mar 2020 17:55:49 +0100 Subject: Added history and some map from sokonline --- src/graphics.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/graphics.cpp') 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; -- cgit