Move pop number to game class
This commit is contained in:
parent
cfc5d425f6
commit
60cb4a1e32
2 changed files with 3 additions and 3 deletions
|
@ -35,9 +35,6 @@ void ConsoleController::run()
|
||||||
//Apply move
|
//Apply move
|
||||||
bool moveDone=m_game.swipe(keyPress);
|
bool moveDone=m_game.swipe(keyPress);
|
||||||
|
|
||||||
//Pop a random number on the grid
|
|
||||||
if(moveDone)
|
|
||||||
m_game.popRandomNumber();
|
|
||||||
|
|
||||||
//Cout grid
|
//Cout grid
|
||||||
m_game.coutGrid();
|
m_game.coutGrid();
|
||||||
|
|
|
@ -30,6 +30,9 @@ bool Game::swipe(kbdh::Direction direction){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(moveDone)
|
||||||
|
this->popRandomNumber();
|
||||||
|
|
||||||
return moveDone;
|
return moveDone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue