From 91583d5699503e981105beecc51d37b59dc1842e Mon Sep 17 00:00:00 2001 From: scratko Date: Fri, 12 Apr 2024 16:33:07 +0300 Subject: Coin checks Coin checks in yellow blocks and stars. Fixed arguments of find_free_directions function. --- pacman.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'pacman.c') diff --git a/pacman.c b/pacman.c index f9b1278..f03941c 100644 --- a/pacman.c +++ b/pacman.c @@ -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 } -- cgit v1.2.3