back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pac.c
diff options
context:
space:
mode:
Diffstat (limited to 'pac.c')
-rw-r--r--pac.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pac.c b/pac.c
index 6579e14..97c3833 100644
--- a/pac.c
+++ b/pac.c
@@ -177,3 +177,13 @@ void make_pac_move(game_space field, struct pacman *pac,
change_point_if_outside_tunnel(&pac->position);
eat_energizer(field, pac);
}
+
+void catch_pac(struct pacman *pac)
+{
+ --pac->lives;
+ if(pac->lives >= 1) {
+ pac->position.y = pac_y;
+ pac->position.x = pac_x;
+ pac->direction = none;
+ }
+}