diff options
author | scratko <m@scratko.xyz> | 2024-04-10 22:01:48 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-04-10 22:01:48 +0300 |
commit | 76b875e095d8b9ca3f6058fbfc0ab2669eed852d (patch) | |
tree | b0d170622775c08881b3e6d516ea97ce2e89ff7b /ghosts.h | |
parent | 155a3c5f91c7a3bd89febfeb9927478961f5ee28 (diff) | |
download | pacman-76b875e095d8b9ca3f6058fbfc0ab2669eed852d.tar.gz pacman-76b875e095d8b9ca3f6058fbfc0ab2669eed852d.tar.bz2 pacman-76b875e095d8b9ca3f6058fbfc0ab2669eed852d.zip |
Searching for all ghosts
Diffstat (limited to 'ghosts.h')
-rw-r--r-- | ghosts.h | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -20,6 +20,9 @@ enum { orange_x = red_x - 3, orange_home_y = blue_home_y, orange_home_x = 0, + pink_shift = 4, + blue_shift = 2, + orange_search_limit = 8 }; enum ghost_color { red, pink, blue, orange }; @@ -57,11 +60,18 @@ void make_ghost_moves(game_space field, struct pacman; void redirect(game_space field, enum intersection_type paths, - struct ghost_type *ghost, struct pacman pac, + struct ghost_type *ghost, struct coordinates target_point, void (*pathfinder)(game_space, struct ghost_type*, - struct pacman pac)); + struct coordinates target_point)); void breadth_first_search(game_space field, struct ghost_type *ghost, - struct pacman pac); + struct coordinates target_point); + +void compute_distance_between_points(game_space field, struct ghost_type *ghost, + struct coordinates target_point); + +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); #endif |