back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/field.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-11 15:04:37 +0300
committerscratko <m@scratko.xyz>2024-04-11 15:04:37 +0300
commit235f8481502263fcdb4823ff0bc4e8f831bc934d (patch)
treeaa7bac493c447571ac88f3793447e05ed17c2d6a /field.h
parent76b875e095d8b9ca3f6058fbfc0ab2669eed852d (diff)
downloadpacman-235f8481502263fcdb4823ff0bc4e8f831bc934d.tar.gz
pacman-235f8481502263fcdb4823ff0bc4e8f831bc934d.tar.bz2
pacman-235f8481502263fcdb4823ff0bc4e8f831bc934d.zip
Removed the reverse motion for ghosts
Yellow intersections added.
Diffstat (limited to 'field.h')
-rw-r--r--field.h22
1 files changed, 14 insertions, 8 deletions
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