diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-05-02 19:26:01 +0200 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2015-05-02 19:26:01 +0200 |
| commit | 36d033caeebd8ccbddf711825a5a96e3930438be (patch) | |
| tree | 07fb279618fdae06aaf148368b607a78ac6823b3 /src/Model/Grid.hpp | |
| parent | 27d646af15bc9147a141aced8cebd30668de9a8e (diff) | |
Make clean code
Diffstat (limited to 'src/Model/Grid.hpp')
| -rw-r--r-- | src/Model/Grid.hpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/Model/Grid.hpp b/src/Model/Grid.hpp index 810cb9b..6942188 100644 --- a/src/Model/Grid.hpp +++ b/src/Model/Grid.hpp @@ -8,32 +8,26 @@ * Date : 29/04/2015 */ #include <iostream> +#include <sstream> #include <vector> - -//#include "ModelConstants.hpp" -#include "Cell.hpp" -#include "./Elements/StringElement.hpp" +#include <tuple> class Grid { private: int m_size; - std::vector<std::vector<Cell<StringElement>*> > m_table; + std::vector<std::vector<int> > m_grid; public: - Grid(int size); + Grid(); ~Grid(); - void show(); + std::string description(); bool isEmpty(int i, int j); - bool gridIsFull(); - int getNRows(); - int getNCols(); - std::vector<Cell<StringElement>* > swipeLine(std::vector<Cell<StringElement>* > line); - void swipeRight(); - void setCell(int i, int j, Cell<StringElement> *cell); - Cell<StringElement>* getCell(short i, short j); + std::tuple<int, int> getRandomEmptyCellCoord(); + bool setCell(std::tuple<int, int> coord, int value); + bool setCell(int i, int j, int value); }; |
