Fixing minor improvements

This commit is contained in:
Urban Modig
2025-08-21 13:50:22 +02:00
parent d06e7131ad
commit dc9dad4d9c
3 changed files with 105 additions and 68 deletions

View File

@ -7,6 +7,8 @@ import java.awt.Point;
public class ScatterToBottomRight implements GhostStrategy {
@Override
public Point chooseTarget(Ghost ghost, PacMan pacman, GameMap map) {
return new Point(map.getHeight() - 1, map.getHeight() - 1);
return new Point(
map.rowToWorldY(map.rows() - 1),
map.colToWorldX(map.columns() - 1));
}
}