From 36d033caeebd8ccbddf711825a5a96e3930438be Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sat, 2 May 2015 19:26:01 +0200 Subject: Make clean code --- src/Model/Grid.hpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src/Model/Grid.hpp') 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 +#include #include - -//#include "ModelConstants.hpp" -#include "Cell.hpp" -#include "./Elements/StringElement.hpp" +#include class Grid { private: int m_size; - std::vector*> > m_table; + std::vector > 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* > swipeLine(std::vector* > line); - void swipeRight(); - void setCell(int i, int j, Cell *cell); - Cell* getCell(short i, short j); + std::tuple getRandomEmptyCellCoord(); + bool setCell(std::tuple coord, int value); + bool setCell(int i, int j, int value); }; -- cgit v1.2.3