Basic score count working
update takes movement into account
This commit is contained in:
@ -15,7 +15,7 @@ public class InkyStrategy implements GhostStrategy {
|
||||
public Point chooseTarget(Ghost ghost, PacMan pacman, GameMap map) {
|
||||
// 1. Two tiles ahead of pacman
|
||||
Direction pacmanDir = pacman.getDirection();
|
||||
Point pacmanPos = pacman.getTilePosition();
|
||||
Point pacmanPos = pacman.getPosition();
|
||||
Point ahead = switch (pacmanDir){
|
||||
case RIGHT -> new Point(pacmanPos.x + 8 * GameMap.MAP_TILESIZE, pacmanPos.y);
|
||||
case LEFT -> new Point(pacmanPos.x - 8 * GameMap.MAP_TILESIZE, pacmanPos.y);
|
||||
|
||||
Reference in New Issue
Block a user