des/ndctt2021 #1

Merged
des merged 10 commits from des/ndctt2021 into main 2021-10-20 08:00:22 +00:00
Showing only changes of commit b97e1c6f2c - Show all commits

View file

@ -27,8 +27,8 @@ GridPosition PacManAI::pelletClosestToPacman(GridPosition position,
// This function is not yet implemented.
// You will implement it as part of module 25.
bool PacManAI::isValidMove(const Move &) {
return false;
bool PacManAI::isValidMove(const Move & move) {
return isWalkableForPacMan(move.position) && move.direction != oppositeDirection(direction);
}
// This function is not yet implemented.