From bdee2852c13f6b02ec5207ded584839a3118233e Mon Sep 17 00:00:00 2001 From: scratko Date: Tue, 2 Apr 2024 17:43:35 +0300 Subject: Initial commit --- pac.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pac.h (limited to 'pac.h') diff --git a/pac.h b/pac.h new file mode 100644 index 0000000..1125694 --- /dev/null +++ b/pac.h @@ -0,0 +1,29 @@ +#ifndef PAC_H_SENTRY +#define PAC_H_SENTRY + +#include "ghosts.h" + +enum { + max_live = 3, + pac_y = 22, + pac_x = 14 +}; + +struct pacman { + char lives; + unsigned char points_eaten; + struct coordinates position; + enum movement_direction direction; +}; + +void initialize_pac(struct pacman *pac); + +void change_pac_direction(game_space field, struct pacman *pac, int key, + enum movement_direction *stored_direction); + +void check_remaining_direction(game_space field, struct pacman *pac, + enum movement_direction *stored_direction); + +void make_pac_move(game_space field, struct pacman *pac); + +#endif -- cgit v1.2.3