mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-08 09:36:34 +01:00
Implement Conway's Game of Life
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
#define GAME_MESSAGE_DEFAULT_TIMEOUT 3
|
||||
|
||||
|
||||
/***** NETWORKING DEFINES *****/
|
||||
/***** NETWORKING CONSTANTS *****/
|
||||
|
||||
/* Header starts after custom packet type byte. Comprised of: NetworkVersion (1b) + GameType (1b) + id (4b) */
|
||||
#define GAME_PACKET_HEADER_SIZE (1 + 1 + sizeof(uint32_t))
|
||||
@@ -99,6 +99,7 @@ typedef enum GameStatus {
|
||||
typedef enum GameType {
|
||||
GT_Centipede = 0u,
|
||||
GT_Chess,
|
||||
GT_Life,
|
||||
GT_Snake,
|
||||
GT_Invalid,
|
||||
} GameType;
|
||||
@@ -297,6 +298,11 @@ void game_window_notify(const GameData *game, const char *message);
|
||||
*/
|
||||
void game_update_score(GameData *game, long int points);
|
||||
|
||||
/*
|
||||
* Sets game score to `val`.
|
||||
*/
|
||||
void game_set_score(GameData *game, long int score);
|
||||
|
||||
/*
|
||||
* Returns the game's current score.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user