back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/ghosts.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-17 17:00:48 +0300
committerscratko <m@scratko.xyz>2024-04-17 18:33:03 +0300
commitef3844bf2128fa82f20c5995d1fca66fadba2ce3 (patch)
tree905048a285a8cd8fd6a070ce3b6c075e9681e59a /ghosts.h
parent194f71c150eb9ee696acca17176092e8b0ce6e4f (diff)
downloadpacman-ef3844bf2128fa82f20c5995d1fca66fadba2ce3.tar.gz
pacman-ef3844bf2128fa82f20c5995d1fca66fadba2ce3.tar.bz2
pacman-ef3844bf2128fa82f20c5995d1fca66fadba2ce3.zip
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.
Diffstat (limited to 'ghosts.h')
-rw-r--r--ghosts.h7
1 files changed, 7 insertions, 0 deletions
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,