#include "Game.hpp" Game::Game() { m_grid = new Grid(4); } Game::~Game() { delete m_grid; } void Game::showGrid() { m_grid->show(); std::cout << std::endl; } 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() { if(m_grid->gridIsFull()){ for(int i=0;i<4;i++){ std::cout << m_grid->getCell(0,i)->description(); } } return true; }