back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pacman.c
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-12 16:33:07 +0300
committerscratko <m@scratko.xyz>2024-04-12 16:33:07 +0300
commit91583d5699503e981105beecc51d37b59dc1842e (patch)
treecce70cc6ff3b045d3f0997727add1fb83af2a382 /pacman.c
parent04a6703fd66a7d34b2556a9c203c4dada3baca38 (diff)
downloadpacman-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.c11
1 files changed, 6 insertions, 5 deletions
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
}