From 8fe2319e189b4d830a892b8c686d08cff5556962 Mon Sep 17 00:00:00 2001 From: scratko Date: Thu, 31 Jul 2025 03:55:59 +0300 Subject: Add README and revise distance metric Added many inline comments for clarity. Introduced initial version of README with gameplay details, controls, and AI logic. Replaced Euclidean distance with Manhattan distance in standard_distance() to better match grid-based movement without diagonal traversal. --- field.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'field.c') diff --git a/field.c b/field.c index fd31606..1db3b72 100644 --- a/field.c +++ b/field.c @@ -295,8 +295,8 @@ enum intersection_type get_intersection(const game_space field, /* * last conditions x-1 == left_outside_tunnel_x and - * x+1 == right_outside_tunnel_x are used by only pacman (while - * cheking remaining direction) + * x+1 == right_outside_tunnel_x are used by only pacman + * because it's only checked for ghosts at intersections. */ struct free_directions find_free_directions(const game_space field, int x, int y) -- cgit v1.2.3