From 235f8481502263fcdb4823ff0bc4e8f831bc934d Mon Sep 17 00:00:00 2001 From: scratko Date: Thu, 11 Apr 2024 15:04:37 +0300 Subject: Removed the reverse motion for ghosts Yellow intersections added. --- field.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'field.h') diff --git a/field.h b/field.h index 4681267..977a3d9 100644 --- a/field.h +++ b/field.h @@ -2,17 +2,20 @@ #define FIELD_H_SENTRY enum { - field_width = 28, - field_height = 29, - door = '#', - block = '/', - coin = '.' + field_width = 28, + field_height = 29, + left_outside_tunnel_x = -1, + right_outside_tunnel_x = field_width, + door = '#', + block = '/', + coin = '.' }; enum intersection_type { - one_path = '1', - two_paths = '2', - three_paths = '3', + one_path = '1', + two_paths = '2', + three_paths = '3', + yellow_block = 'y', direct_path }; @@ -53,6 +56,9 @@ enum intersection_type get_intersection(const game_space field, struct free_directions find_free_directions(game_space field, int y, int x); int is_obstacle(game_space field, int x, int y); + int field_has_coin(int x, int y); +void change_point_if_outside_tunnel(struct coordinates *point); + #endif -- cgit v1.2.3