diff options
author | scratko <m@scratko.xyz> | 2024-04-16 02:37:12 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2024-04-16 02:37:12 +0300 |
commit | 194f71c150eb9ee696acca17176092e8b0ce6e4f (patch) | |
tree | feff177d5ffca319a71db4848f653b7ea7ae17c6 /field.h | |
parent | e42ac35110b1819bf9762fbb4504ab920a17e207 (diff) | |
download | pacman-194f71c150eb9ee696acca17176092e8b0ce6e4f.tar.gz pacman-194f71c150eb9ee696acca17176092e8b0ce6e4f.tar.bz2 pacman-194f71c150eb9ee696acca17176092e8b0ce6e4f.zip |
Scoring system
Pacman's starting position doesn't contain a coin.
Fixed an error in field_has_energizer().
The field prints the number of pacman lives and the score.
All coin checks are moved to the field.c file.
Restart is replaced by initialization of starting parameters.
The final stage contains the game results screens.
Queue clearing is combined with field clearing.
Get_out_stage moved to struct mode_type.
Diffstat (limited to 'field.h')
-rw-r--r-- | field.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -3,7 +3,7 @@ enum { field_width = 28, - field_height = 29, + field_height = 30, left_outside_tunnel_x = -1, right_outside_tunnel_x = field_width, door = '#', @@ -44,6 +44,7 @@ void display_ghosts_on_field(struct ghost_type *red_ghost, struct ghost_type *pink_ghost, struct ghost_type *blue_ghost, struct ghost_type *orange_ghost); +void display_score(int value); struct queue; struct coordinates; @@ -58,7 +59,11 @@ struct free_directions find_free_directions(game_space field, int y, int x); int is_obstacle(game_space field, int x, int y); -int field_has_coin(int x, int y); + +int check_coin_for_pac(game_space field, struct coordinates position, + struct queue *eaten_coins); + +int field_has_energizer(const game_space field, int x, int y); void change_point_if_outside_tunnel(struct coordinates *point); @@ -69,4 +74,6 @@ int is_equal_points(struct coordinates first_point, struct coordinates void clear_field(game_space field); +void erase_life(int value); + #endif |