summaryrefslogtreecommitdiff
path: root/src/Model/Grid.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Grid.hpp')
-rw-r--r--src/Model/Grid.hpp22
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);
};