diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-11-05 11:08:16 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-11-05 11:08:16 +0100 |
| commit | 075335d187f45de7d002e3f44f6ec93b30abed78 (patch) | |
| tree | 0326b8ef2b4b779f4a1eee10a62b1a803c6e19ba /include/rounds.h | |
| parent | 2b23a7efd6cc4d55e10e01c978a3614e7b97c93c (diff) | |
rounds
Diffstat (limited to 'include/rounds.h')
| -rw-r--r-- | include/rounds.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/rounds.h b/include/rounds.h new file mode 100644 index 0000000..832cc1d --- /dev/null +++ b/include/rounds.h @@ -0,0 +1,27 @@ +#ifndef INCLUDE_ROUNDS +#define INCLUDE_ROUNDS + +#include <projectbase/project_base.h> + +#define ROUND_SWITCH_TIME 6.0f + +typedef enum t_round_state { + ROUND_SPAWNING, + ROUND_SWITCHING, +} round_state; + +typedef struct t_zombie_round { + u32 round_nr; + u32 zombies; + round_state state; + float round_timer; +} zombie_round; + +zombie_round _current_round = {.round_nr = 0, .zombies = 0, .state = ROUND_SWITCHING}; + +bool current_round_is_done(); +void start_next_round(); +int zombies_left_in_current_round(); +void update_round_server(); + +#endif
\ No newline at end of file |
