public class PacmanMinimax implements Pacman {

    private final int depth;

    public PacmanMinimax(int depth){
        this.depth = depth;
    }

    private int calculateHeuristic(PacmanState state){
        if (state.isWon()) return Integer.MAX_VALUE - state.getScore();
        if (state.isLost()) return Integer.MIN_VALUE + state.getScore();
        int minDist = state.getHeight() * state.getWidth();
        for (Position position: state.findFoods()){
            minDist = Math.min(position.dist(state.findPacman()), minDist);
        }
        return (state.getWidth() * state.getHeight() - state.findFoods().size()) * state.getWidth() * state.getHeight()
                - minDist;
    }

}
