diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-05-03 01:09:19 +0200 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-05-03 01:09:19 +0200 |
| commit | cfc5d425f68c1a98b86ef91d92ac82785d0f33a2 (patch) | |
| tree | 8b6467a417c2e37b296f45a5a80f3673c2ed4d6d /src/Model/Game.cpp | |
| parent | 4716e4d231a26c45fa7d4e38a79f4f44c3b8348a (diff) | |
Correct bug on merging and pop number
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; } |
