bug sous osx
This commit is contained in:
parent
9fbd4e0fed
commit
e241abc9df
5 changed files with 16 additions and 16 deletions
|
@ -19,9 +19,9 @@ Cell::~Cell()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
/*
|
|
||||||
void Cell::description()
|
std::string Cell::description()
|
||||||
{
|
{
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Cell
|
||||||
~Cell();
|
~Cell();
|
||||||
|
|
||||||
// Describes the cell in a terminal
|
// Describes the cell in a terminal
|
||||||
//std::string description();
|
std::string description();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include "Grid.hpp"
|
#include "Grid.hpp"
|
||||||
|
|
||||||
/*
|
|
||||||
Grid::Grid(int size)
|
Grid::Grid(int size)
|
||||||
{
|
{
|
||||||
m_table = std::vector<std::vector<Cell*>>(size);
|
m_table = std::vector<std::vector<Cell*> >(size);
|
||||||
for(int i = 0 ; i < size ; i++)
|
for(int i = 0 ; i < size ; i++)
|
||||||
{
|
{
|
||||||
m_table[i] = std::vector<Cell*>(size);
|
m_table[i] = std::vector<Cell*>(size);
|
||||||
|
@ -19,20 +19,20 @@ Grid::~Grid()
|
||||||
{
|
{
|
||||||
for(int i = 0 ; i < m_table.size() ; i++)
|
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];
|
delete m_table[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Grid::description()
|
void Grid::afficher()
|
||||||
{
|
{
|
||||||
for(int i = 0 ; i < m_table.size() ; i++)
|
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 << m_table[i][j]->description();
|
||||||
}
|
}
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
|
@ -11,17 +11,17 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Cell.hpp"
|
#include "Cell.hpp"
|
||||||
/*
|
|
||||||
class Grid
|
class Grid
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::vector<std::vector<Cell*>> m_table;
|
std::vector<std::vector<Cell*> > m_table;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Grid(int size);
|
Grid(int size);
|
||||||
~Grid();
|
~Grid();
|
||||||
void description();
|
void afficher();
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
// Grid * grid = new Grid();
|
Grid * grid = new Grid(4);
|
||||||
|
|
||||||
// grid->description();
|
grid->afficher();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue