From 0cf5dfed3e492608d044a5fc90c1815fab506fd7 Mon Sep 17 00:00:00 2001 From: scratko Date: Sun, 14 Apr 2024 21:18:36 +0300 Subject: Capture and liberation of ghosts Fixed coordinate in field_has_coin. Added marks on the field for the liberation zone (1 in front of #). Prison parameters for the ghost are set. Fixed condition in BFS search (additionally exclude the current point in the loop, dx == 0 && dy == 0). --- pac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pac.c') diff --git a/pac.c b/pac.c index a3cae71..6579e14 100644 --- a/pac.c +++ b/pac.c @@ -14,8 +14,7 @@ void initialize_pac(struct pacman *pac) static enum movement_direction get_matching_for_directions(game_space field, struct pacman *pac, - enum movement_direction - direction) + enum movement_direction direction) { struct free_directions free_paths = find_free_directions(field, pac->position.x, pac->position.y); -- cgit v1.2.3