diff options
author | scratko <m@scratko.xyz> | 2024-04-15 20:40:14 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-04-15 20:40:14 +0300 |
commit | e42ac35110b1819bf9762fbb4504ab920a17e207 (patch) | |
tree | 8d5465dc0251f392883dc8e01dcae1fba7ec715b /field.c | |
parent | 0cf5dfed3e492608d044a5fc90c1815fab506fd7 (diff) | |
download | pacman-e42ac35110b1819bf9762fbb4504ab920a17e207.tar.gz pacman-e42ac35110b1819bf9762fbb4504ab920a17e207.tar.bz2 pacman-e42ac35110b1819bf9762fbb4504ab920a17e207.zip |
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().
Diffstat (limited to 'field.c')
-rw-r--r-- | field.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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(); } |