package se.urmo.game.entities.ghost.mode;

import lombok.extern.slf4j.Slf4j;
import se.urmo.game.entities.ghost.Ghost;
import se.urmo.game.entities.ghost.strategy.GhostStrategy;
import se.urmo.game.entities.pacman.PacMan;
import se.urmo.game.map.GameMap;

@Slf4j
public class ChaseGhostMode extends AbstractGhostModeImpl {

    public ChaseGhostMode(Ghost ghost, GhostStrategy strategy) {
        super(ghost, strategy, ghost.getLevelManager(), ghost.getAnimation());

    }

    @Override
    public void update(Ghost ghost, PacMan pacman, GameMap map) {
        // Use the common position update method with chase strategy
        updatePosition(ghost, pacman, map);
    }

//    @Override
//    public void enter(Ghost ghost) {
//    }

    @Override
    public double getSpeed() {
        return Ghost.BASE_SPEED * levelManager.getGhostSpeed();
    }
}