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:
+17
-12
@@ -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
|
||||
Reference in New Issue
Block a user