back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/ghosts.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-12 03:17:46 +0300
committerscratko <m@scratko.xyz>2024-04-12 03:17:46 +0300
commit04a6703fd66a7d34b2556a9c203c4dada3baca38 (patch)
tree3d2cbdaae515d90747e507ba8a8ebfd7bdc44fed /ghosts.h
parent235f8481502263fcdb4823ff0bc4e8f831bc934d (diff)
downloadpacman-04a6703fd66a7d34b2556a9c203c4dada3baca38.tar.gz
pacman-04a6703fd66a7d34b2556a9c203c4dada3baca38.tar.bz2
pacman-04a6703fd66a7d34b2556a9c203c4dada3baca38.zip
Added behavior modes
Reverse direction Random direction
Diffstat (limited to 'ghosts.h')
-rw-r--r--ghosts.h9
1 files changed, 8 insertions, 1 deletions
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