#ifndef _TIMESTEP_H #define _TIMESTEP_H #include "cell.h" class TimeStep { public: // default constructor TimeStep(); // constructor -- take the step number; // also constructs the grid with non-cells // (see more info below) TimeStep(int n); //returns the particular cell (the actual object) // specified by row x and column y in the 2D CA. Cell& TheCell(int x, int y); //returns the number of on cells around a particular cell int On(int x, int y); // determines the Long Life configuration of this // timestep from the previous timestep's configuration void EvolutionConwaysLife(TimeStep previousStep); // determines the Conway's Game of Life configuration // of this timestep from the previous timestep's configuration void EvolutionLongLife(TimeStep previousStep); Cell grid[12][12]; // the 2D array that holds the cells int step; //step number int on_counter; //counts the number of on cells around a particular cell }; #endif