This code is hot garabage, but just testing things. Trying a really terrible way to do 'Updates' on the cells' statuses. Not really working but its a start of the checking the rules for the game.

This commit is contained in:
2022-06-07 21:40:23 -05:00
parent 03883a04de
commit 4bcc3af0a8
3 changed files with 112 additions and 26 deletions
+17 -12
View File
@@ -8,22 +8,27 @@ typedef enum {
Dead
} State;
typedef struct cell {
struct cell* TopLeft;
struct cell* Top;
struct cell* TopRight;
struct cell* Left;
struct cell* Right;
struct cell* BottomLeft;
struct cell* Botttom;
struct cell* BottomRight;
State Status;
SDL_Rect Hitbox;
int Visited;
typedef struct {
int x;
int y;
} Point;
typedef struct cell {
// Point TopLeft;
// Point Top;
// Point TopRight;
// Point Left;
// Point Right;
// Point BottomLeft;
// Point Botttom;
// Point BottomRight;
int living;
State Status;
int y;
int x;
} Cell;
Cell* CreateCell(int x, int y);
void UpdateCell(Cell*);
#endif