summaryrefslogtreecommitdiff
path: root/src/Model/Grid.cpp
blob: d7d3f15262d6a4690b15d1f04524c929ea9fde33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "Grid.hpp"

/*
Grid::Grid(int size)
{
	m_table = std::vector<std::vector<Cell*>>(size);
	for(int i = 0 ; i < size ; i++)
	{
		m_table[i] = std::vector<Cell*>(size);
		for (int j = 0 ; j < size ; j++)
		{
			Cell * cell = new Cell();
			m_table[i][j] = cell;
		}
	}
}

Grid::~Grid()
{
	for(int i = 0 ; i < m_table.size() ; i++)
	{
		for(int i = 0 ; j < m_table[i].size() ; j++)
			delete m_table[i][j];
	}
}

void Grid::description()
{
	for(int i = 0 ; i < m_table.size() ; i++)
	{
		for(int j = 0 ; j < m_table[i].size() ; i++)
		{
			std::cout << m_table[i][j]->description();
		}
		std::cout << std::endl;
	}
}
*/