diff options
author | scratko <m@scratko.xyz> | 2024-04-12 03:17:46 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-04-12 03:17:46 +0300 |
commit | 04a6703fd66a7d34b2556a9c203c4dada3baca38 (patch) | |
tree | 3d2cbdaae515d90747e507ba8a8ebfd7bdc44fed /ghosts.h | |
parent | 235f8481502263fcdb4823ff0bc4e8f831bc934d (diff) | |
download | pacman-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.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 |