Fix whitespace
This commit is contained in:
parent
4b5f429c0d
commit
a2ed149069
1 changed files with 7 additions and 7 deletions
|
@ -15,11 +15,11 @@ void Game::play()
|
||||||
while(!m_grid->gridIsFull())
|
while(!m_grid->gridIsFull())
|
||||||
{
|
{
|
||||||
m_grid->show();
|
m_grid->show();
|
||||||
|
|
||||||
pop();
|
pop();
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_grid->show();
|
m_grid->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,23 +32,23 @@ void Game::showGrid()
|
||||||
void Game::pop()
|
void Game::pop()
|
||||||
{
|
{
|
||||||
bool cellChosen = false;
|
bool cellChosen = false;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
while(!cellChosen)
|
while(!cellChosen)
|
||||||
{
|
{
|
||||||
i = rand() % 4;
|
i = rand() % 4;
|
||||||
j = rand() % 4;
|
j = rand() % 4;
|
||||||
|
|
||||||
if (m_grid->isEmpty(i,j))
|
if (m_grid->isEmpty(i,j))
|
||||||
cellChosen = true;
|
cellChosen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_grid->setCell(i, j, new Cell("2"));
|
m_grid->setCell(i, j, new Cell("2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Game::isOver()
|
bool Game::isOver()
|
||||||
{
|
{
|
||||||
return m_grid->gridIsFull();
|
return m_grid->gridIsFull();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue