diff --git a/src/Model/Game.cpp b/src/Model/Game.cpp index 1e24b11..aa3626c 100644 --- a/src/Model/Game.cpp +++ b/src/Model/Game.cpp @@ -15,11 +15,11 @@ void Game::play() while(!m_grid->gridIsFull()) { m_grid->show(); - + pop(); std::cout << std::endl; } - + m_grid->show(); } @@ -32,23 +32,23 @@ void Game::showGrid() void Game::pop() { bool cellChosen = false; - + int i; int j; - + while(!cellChosen) { i = rand() % 4; j = rand() % 4; - + if (m_grid->isEmpty(i,j)) cellChosen = true; } - + m_grid->setCell(i, j, new Cell("2")); } bool Game::isOver() { return m_grid->gridIsFull(); -} \ No newline at end of file +}