diff options
author | scratko <m@scratko.xyz> | 2024-04-12 16:33:07 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-04-12 16:33:07 +0300 |
commit | 91583d5699503e981105beecc51d37b59dc1842e (patch) | |
tree | cce70cc6ff3b045d3f0997727add1fb83af2a382 /pacman.c | |
parent | 04a6703fd66a7d34b2556a9c203c4dada3baca38 (diff) | |
download | pacman-91583d5699503e981105beecc51d37b59dc1842e.tar.gz pacman-91583d5699503e981105beecc51d37b59dc1842e.tar.bz2 pacman-91583d5699503e981105beecc51d37b59dc1842e.zip |
Coin checks
Coin checks in yellow blocks and stars.
Fixed arguments of find_free_directions function.
Diffstat (limited to 'pacman.c')
-rw-r--r-- | pacman.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -12,7 +12,7 @@ enum { sleep_duration = 190000, key_escape = 27, count_get_out_moves = 6, - chase_move_limit = 100, + chase_move_limit = 70, scatter_move_limit = 35, frightened_move_limit = 30, phase_limit = 4 @@ -40,7 +40,8 @@ static void change_mode(struct mode_type *mode_params) ++mode_params->phase_number; if(mode_params->phase_number == phase_limit) mode_params->current_mode = chase; - ++mode_params->reverse_direction; + if(mode_params->phase_number != phase_limit) + ++mode_params->reverse_direction; } break; case scatter: @@ -293,11 +294,11 @@ int main() #if 1 move(0, 50); if(mode_params.current_mode == chase) - printw("CHASE"); + printw("CHASE %d ", mode_params.chase_count); else if(mode_params.current_mode == scatter) - printw("SCATTER"); + printw("SCATTER %d ", mode_params.scatter_count); else if(mode_params.current_mode == frightened) - printw("FRIGHTENED"); + printw("FRIGHTENED %d ", mode_params.frightened_count); refresh(); #endif } |