From 04a6703fd66a7d34b2556a9c203c4dada3baca38 Mon Sep 17 00:00:00 2001 From: scratko Date: Fri, 12 Apr 2024 03:17:46 +0300 Subject: Added behavior modes Reverse direction Random direction --- ghosts.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ghosts.h') diff --git a/ghosts.h b/ghosts.h index f407839..d55da6a 100644 --- a/ghosts.h +++ b/ghosts.h @@ -38,7 +38,7 @@ struct ghost_type { struct coordinates position; struct coordinates home_position; enum ghost_color color; - enum behavior_mode mode; + int frightened_status; enum movement_direction direction; }; @@ -64,6 +64,8 @@ void redirect(game_space field, enum intersection_type paths, void (*pathfinder)(game_space, struct ghost_type*, struct coordinates target_point)); +void random_redirect(game_space field, struct ghost_type *ghost); + void breadth_first_search(game_space field, struct ghost_type *ghost, struct coordinates target_point); @@ -74,4 +76,9 @@ struct coordinates identify_target_in_front(struct pacman pac, int shift); struct coordinates identify_blue_target(struct pacman pac, const struct ghost_type *red_ghost); +void reverse_all_ghosts(struct ghost_type *red_ghost, + struct ghost_type *pink_ghost, + struct ghost_type *blue_ghost, + struct ghost_type *orange_ghost); + #endif -- cgit v1.2.3