back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/field.c
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2025-07-31 03:55:59 +0300
committerscratko <m@scratko.xyz>2025-07-31 04:07:30 +0300
commit8fe2319e189b4d830a892b8c686d08cff5556962 (patch)
tree60479d39949e0a13efce32d75e5fec1886eae09f /field.c
parentcba2e3ddd2596f519750aed1179da8a757023850 (diff)
downloadpacman-8fe2319e189b4d830a892b8c686d08cff5556962.tar.gz
pacman-8fe2319e189b4d830a892b8c686d08cff5556962.tar.bz2
pacman-8fe2319e189b4d830a892b8c686d08cff5556962.zip
Add README and revise distance metricHEADmaster
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.
Diffstat (limited to 'field.c')
-rw-r--r--field.c4
1 files changed, 2 insertions, 2 deletions
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)