From e42ac35110b1819bf9762fbb4504ab920a17e207 Mon Sep 17 00:00:00 2001 From: scratko Date: Mon, 15 Apr 2024 20:40:14 +0300 Subject: Game over and restart Game over screen. Corrected coordinates in is_liberation_zone(). The capture of pacman. Changed the function name from caughting_stage() to catching_stage(). --- field.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'field.c') diff --git a/field.c b/field.c index 340e380..560cae9 100644 --- a/field.c +++ b/field.c @@ -53,6 +53,12 @@ game_space get_new_field() return field; } +void clear_field(game_space field) +{ + free(field); + field = NULL; +} + int field_has_coin(int x, int y) { return !((x == 9 && y == 12)|| (x == 18 && y == 12) || @@ -107,6 +113,9 @@ void print_field(game_space field) case door: addch('#'); break; + case ' ': + addch(' '); + break; } refresh(); } -- cgit v1.2.3