Works. Generates random grid
This commit is contained in:
@@ -7,13 +7,18 @@
|
||||
typedef struct Grid {
|
||||
unsigned int size;
|
||||
unsigned int width;
|
||||
bool* arr;
|
||||
bool* state;
|
||||
bool* next_state;
|
||||
} Grid;
|
||||
|
||||
void initGrid(Grid* grid, unsigned int width, unsigned int height);
|
||||
|
||||
void randomizeGrid(Grid* grid);
|
||||
|
||||
unsigned int toIndex(Grid* grid, int x, int y);
|
||||
|
||||
bool getPixel(Grid* grid, int x, int y);
|
||||
|
||||
void clearGrid(Grid* grid);
|
||||
|
||||
void updateGrid(Grid* grid);
|
||||
|
||||
Reference in New Issue
Block a user