diff options
author | scratko <m@scratko.xyz> | 2024-04-02 17:43:35 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-04-02 17:43:35 +0300 |
commit | bdee2852c13f6b02ec5207ded584839a3118233e (patch) | |
tree | 39f1c14be91fb848ce0f94a64532e48a7667e5de /pac.h | |
download | pacman-bdee2852c13f6b02ec5207ded584839a3118233e.tar.gz pacman-bdee2852c13f6b02ec5207ded584839a3118233e.tar.bz2 pacman-bdee2852c13f6b02ec5207ded584839a3118233e.zip |
Initial commit
Diffstat (limited to 'pac.h')
-rw-r--r-- | pac.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -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 |