diff --git a/src/Model/Cell.cpp b/src/Model/Cell.cpp index a0729f7..22eaafe 100644 --- a/src/Model/Cell.cpp +++ b/src/Model/Cell.cpp @@ -19,9 +19,9 @@ Cell::~Cell() } // Description -/* -void Cell::description() + +std::string Cell::description() { return m_value; } -*/ + diff --git a/src/Model/Cell.hpp b/src/Model/Cell.hpp index dd946ab..7775bf5 100644 --- a/src/Model/Cell.hpp +++ b/src/Model/Cell.hpp @@ -21,7 +21,7 @@ class Cell ~Cell(); // Describes the cell in a terminal - //std::string description(); + std::string description(); }; diff --git a/src/Model/Grid.cpp b/src/Model/Grid.cpp index d7d3f15..ade3f74 100644 --- a/src/Model/Grid.cpp +++ b/src/Model/Grid.cpp @@ -1,9 +1,9 @@ #include "Grid.hpp" -/* + Grid::Grid(int size) { - m_table = std::vector>(size); + m_table = std::vector >(size); for(int i = 0 ; i < size ; i++) { m_table[i] = std::vector(size); @@ -19,20 +19,20 @@ Grid::~Grid() { for(int i = 0 ; i < m_table.size() ; i++) { - for(int i = 0 ; j < m_table[i].size() ; j++) + for(int j = 0 ; j < m_table[i].size() ; j++) delete m_table[i][j]; } } -void Grid::description() +void Grid::afficher() { for(int i = 0 ; i < m_table.size() ; i++) { - for(int j = 0 ; j < m_table[i].size() ; i++) + for(int j = 0 ; j < m_table[i].size() ; j++) { std::cout << m_table[i][j]->description(); } std::cout << std::endl; } } -*/ + diff --git a/src/Model/Grid.hpp b/src/Model/Grid.hpp index 304e436..e3bc888 100644 --- a/src/Model/Grid.hpp +++ b/src/Model/Grid.hpp @@ -11,17 +11,17 @@ #include #include "Cell.hpp" -/* + class Grid { private: - std::vector> m_table; + std::vector > m_table; public: Grid(int size); ~Grid(); - void description(); + void afficher(); }; -*/ + #endif diff --git a/src/main.cpp b/src/main.cpp index 689767a..12f6c6d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,9 +5,9 @@ int main() { -// Grid * grid = new Grid(); + Grid * grid = new Grid(4); -// grid->description(); + grid->afficher(); return 0; }