ncurses-gameoflife/grid.h

22 lines
333 B
C
Raw Normal View History

2020-06-12 09:46:44 +08:00
#include <stdbool.h>
#include <ncurses.h>
#ifndef GRID_H
#define GRID_H
2020-06-12 09:46:44 +08:00
typedef struct Grid {
unsigned int size;
unsigned int width;
bool* arr;
} Grid;
void initGrid(Grid* grid, unsigned int width, unsigned int height);
void clearGrid(Grid* grid);
void putPixel(Grid* grid, int x, int y);
void drawGrid(Grid* grid);
#endif