back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pacman.c
Commit message (Collapse)AuthorAgeFilesLines
* Release versionscratko2024-04-181-81/+161
|
* Added colorsscratko2024-04-171-13/+59
| | | | | | | | | | | Changed the number of pacman's lives. Fixed clear_or_revert_symbol(). Target hit display. Changed ghost initialization. Clearing ghost positions is moved to the function. Added flag in struct ghost_type (reached_pacman). Changed catching stage. Now eating an energizer resets the counter.
* Scoring systemscratko2024-04-161-80/+88
| | | | | | | | | | | 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.
* Game over and restartscratko2024-04-151-107/+168
| | | | | | | Game over screen. Corrected coordinates in is_liberation_zone(). The capture of pacman. Changed the function name from caughting_stage() to catching_stage().
* Capture and liberation of ghostsscratko2024-04-141-3/+136
| | | | | | | | Fixed coordinate in field_has_coin. Added marks on the field for the liberation zone (1 in front of #). Prison parameters for the ghost are set. Fixed condition in BFS search (additionally exclude the current point in the loop, dx == 0 && dy == 0).
* Coin checksscratko2024-04-121-5/+6
| | | | | Coin checks in yellow blocks and stars. Fixed arguments of find_free_directions function.
* Added behavior modesscratko2024-04-121-21/+197
| | | | | Reverse direction Random direction
* Removed the reverse motion for ghostsscratko2024-04-111-0/+9
| | | | Yellow intersections added.
* Searching for all ghostsscratko2024-04-101-3/+32
|
* Tracking coins eatenscratko2024-04-071-19/+35
| | | | | | | The initialization of ncurses parameters and ghosts was put into functions. The order of movements has been changed: now pacman moves first. Accounting for eaten coins. Correct coin erasure.
* BFS, queue filesscratko2024-04-071-18/+17
| | | | | | Fixed remaining direction check for pacman (old version was commented out). Breadth First Search for red ghost. Changed switch style.
* Initial commitscratko2024-04-021-0/+78