-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMirror.h
30 lines (30 loc) · 905 Bytes
/
Mirror.h
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
/**
* a class that reprents a Grid/Board (2D array) that is composed of pointers to Cell instances
* follows the Mirror Mode rules
* @author Tarek El-Hajjaoui
* @version 1.0
*/
#ifndef MIRROR_H
#define MIRROR_H
#include "Grid.h"
#include <string>
class Mirror: public Grid{
/* public fields */
public:
/* Default Constructor */
Mirror();
/* Overloaded Constructors */
Mirror(string file, int transition); // accepts a file (that contains a given grid)
Mirror(int rows, int columns, int transition);
Mirror(int rows, int columns, float populationDensity, int transition);
/* Copy Constructor */
Mirror(Grid ¤tGrid);
/* Destructor */
~Mirror();
/* HELPER FUNCTIONS */
string printGrid() override;
int calculateNumberOfNeighbors(int row, int col, Mirror ¤tGrid);
void next(Mirror ¤tGrid, bool print);
private:
};
#endif