Prefer extends Game to grid than encapsulation
This commit is contained in:
parent
3384204edc
commit
1bebaf0f92
3 changed files with 25 additions and 24 deletions
|
@ -13,11 +13,11 @@
|
|||
#include "Grid.hpp"
|
||||
#include <tuple>
|
||||
|
||||
class Game
|
||||
class Game : public Grid
|
||||
{
|
||||
private:
|
||||
//Members
|
||||
Grid m_grid;
|
||||
//Grid m_grid;
|
||||
int m_score;
|
||||
int m_nbMove;
|
||||
|
||||
|
@ -30,13 +30,13 @@ class Game
|
|||
bool swipe(kbdh::Direction direction);
|
||||
void coutGrid();
|
||||
void popRandomNumber();
|
||||
bool isOver();
|
||||
//bool isOver();
|
||||
|
||||
//Getters and Setters
|
||||
int getScore();
|
||||
int getNbMove();
|
||||
int maxStrLenInGrid();
|
||||
std::vector<std::vector<int> > getGrid();
|
||||
//int maxStrLenInGrid();
|
||||
//std::vector<std::vector<int> > getGrid();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue