Centralized Pacman state transitions into a new `setState` method to improve clarity and consistency. Removed redundant `reset` and `startDeathAnimation` methods, merging their logic into state management. Adjusted game state transitions to align with the new approach.
Introduced a new "FROZEN" mode to the Ghost state machine, ensuring proper handling in ghost behaviors and animations. Updated `GhostManager` and `Ghost` classes to integrate this mode, including relevant logic for updates and animations. Simplified and refined ghost initialization and strategy handling for better code maintainability.
Added a new "eaten" mode for ghosts, including animations, movement strategy, and logic to reset ghosts after being eaten. Adjusted scoring for frightened ghosts using a fright multiplier and introduced enhancements like streamlined direction prioritization and position alignment. Also temporarily disabled non-essential ghosts for testing purposes.
Streamlined collision logic by introducing helper methods for boundary calculations and movement validation. Replaced commented-out code with efficient implementations, improving readability and maintainability. Added clear documentation for new methods to better convey their purpose and usage.
Replaced hardcoded sprite loading logic with centralized SpriteSheetManager to improve maintainability and reduce duplication. Adjusted related methods to use the new Sprites record for streamlined sprite management.