Minor fixes

This commit is contained in:
Urban Modig
2025-09-04 23:12:16 +02:00
parent c475d3cb02
commit ebbc82b70e
6 changed files with 12 additions and 15 deletions

View File

@ -211,7 +211,7 @@ public class PlayingState implements GameState {
for (Ghost ghost : ghostManager.getGhosts()) {
if (deathInProgress) return; // guard
//if(overlap(pacman, ghost)
double dist = pacman.distanceTo(ghost.getPosition());
double dist = pacman.distanceTo(ghost.getPosition().asPoint());
if (dist < GameMap.MAP_TILESIZE / 2.0) {
if (ghost.isEaten()) return;
if (ghost.isFrightened()) {