diff options
Diffstat (limited to 'src/Model/Game.cpp')
| -rw-r--r-- | src/Model/Game.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Model/Game.cpp b/src/Model/Game.cpp index 6039bc9..5be88d9 100644 --- a/src/Model/Game.cpp +++ b/src/Model/Game.cpp @@ -12,23 +12,25 @@ Game::~Game(){ bool Game::swipe(kbdh::Direction direction){ + bool moveDone; + switch(direction){ case kbdh::Left: - m_grid.swipeLeft(); + moveDone=m_grid.swipeLeft(); break; case kbdh::Right: - m_grid.swipeRight(); + moveDone=m_grid.swipeRight(); break; case kbdh::Up: - m_grid.swipeUp(); + moveDone=m_grid.swipeUp(); break; case kbdh::Down: - m_grid.swipeDown(); + moveDone=m_grid.swipeDown(); break; } - return true; + return moveDone; } |
