1#ifndef PACMAN_GHOSTNAVIGATOR_H
2#define PACMAN_GHOSTNAVIGATOR_H
87 template<
typename Scorer>
88 [[nodiscard]]
static Moves selectBestMove(
const World& world,
const GhostModel& ghost,
int targetX,
int targetY, Scorer scoreFunc);
Definition GhostModel.h:36
Definition GhostNavigator.h:8
static bool isAtIntersection(const World &world, const GhostModel &ghost)
Checks whether the provided Ghost currently is at an intersection.
Definition GhostNavigator.cpp:15
static Moves maximizeDistance(const World &world, const GhostModel &ghost)
Will return the best Move from all possible moves to maximize the Manhattan distance between the Ghos...
Definition GhostNavigator.cpp:157
static Moves minimizeDistance(const World &world, const GhostModel &ghost, int targetX, int targetY)
Will return the best Move from all possible moves to minimize the Manhattan distance between the Ghos...
Definition GhostNavigator.cpp:167
static std::vector< Moves > getPossibleMoves(const World &world, const GhostModel &ghost)
Checks all possible directions the Ghost can go at its current position and returns them.
Definition GhostNavigator.cpp:52
static std::list< Moves > findPathToSpawn(const World &world, const GhostModel &ghost)
Determines the fastest path back to the Ghost enclosure starting from the Ghost position using BFS pa...
Definition GhostNavigator.cpp:100
static bool sameDirection(Moves a, Moves b)
Compares Move a and b and returns whether they are in the same direction.
Definition GhostNavigator.cpp:9
Definition Difficulty.h:6
Moves
Definition EntityModel.h:8