From ef3844bf2128fa82f20c5995d1fca66fadba2ce3 Mon Sep 17 00:00:00 2001 From: scratko Date: Wed, 17 Apr 2024 17:00:48 +0300 Subject: Added colors Changed the number of pacman's lives. Fixed clear_or_revert_symbol(). Target hit display. Changed ghost initialization. Clearing ghost positions is moved to the function. Added flag in struct ghost_type (reached_pacman). Changed catching stage. Now eating an energizer resets the counter. --- ghosts.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ghosts.h') diff --git a/ghosts.h b/ghosts.h index 3eb58f7..ff8eb75 100644 --- a/ghosts.h +++ b/ghosts.h @@ -63,6 +63,7 @@ struct ghost_type { enum movement_direction direction; struct prison prison_params; struct capture capture_info; + int reached_pacman; }; void initialize_ghost(struct ghost_type *ghost, enum ghost_color color); @@ -74,6 +75,12 @@ void pull_out_ghosts(int *get_out_stage, struct ghost_type *orange_ghost); struct queue; +void clear_ghost_positions(game_space field, const struct queue *eaten_coins, + const struct ghost_type *red_ghost, + const struct ghost_type *pink_ghost, + const struct ghost_type *blue_ghost, + const struct ghost_type *orange_ghost); + void make_ghost_moves(game_space field, struct ghost_type *red_ghost, struct ghost_type *pink_ghost, -- cgit v1.2.3