diff --git a/exercises/25/pacman_ai/README.md b/exercises/25/pacman_ai/README.md index b5aba89..3a72bfe 100644 --- a/exercises/25/pacman_ai/README.md +++ b/exercises/25/pacman_ai/README.md @@ -7,10 +7,10 @@ Let's implement a naive AI for PacMan. ## Background: PacMan Moves At each intersection, check if there is a ghost directly inline with that path. If the path is free of ghosts, you are -allowed to turn there. And if PacMan is moving in a direction, and a ghost enters his path, then pacman will reverse. +allowed to turn there. And if PacMan is moving in a direction, and a ghost enters his path, then PacMan will reverse. -For example if pacman is at an intersection and can go either right or up, and there is a ghost in the path going right, -then pacman will go up. Then while pacman is going up, a ghost enters that path, pacman will go back. +For example if PacMan is at an intersection and can go either right or up, and there is a ghost in the path going right, +then PacMan will go up. Then while PacMan is going up, a ghost enters that path, PacMan will go back. You only need to worry about the grid itself and any ghosts on the North/South/East/West axis of PacMan. @@ -19,7 +19,7 @@ You only need to worry about the grid itself and any ghosts on the North/South/E ### Part 1 Implement [PacManAI::pelletClosestToPacman](../../../lib/PacManAI.cpp) and test your implementation with the test -in [testPacmanAI.cpp](../../../test/testPacmanAI.cpp) called _"Find pellet closest to pacman"_ +in [testPacmanAI.cpp](../../../test/testPacmanAI.cpp) called _"Find pellet closest to PacMan"_ The function should return the position of the pellet that is "closest" to PacMan. One implementation could be to sort the vector of pellets by the distance they have to PacMan, and then return the first one. diff --git a/test/testPacmanAI.cpp b/test/testPacmanAI.cpp index 0c13b36..4d429fb 100644 --- a/test/testPacmanAI.cpp +++ b/test/testPacmanAI.cpp @@ -2,7 +2,7 @@ #include #include -TEST_CASE("Find pellet closest to pacman", "[AI]") { +TEST_CASE("Find pellet closest to PacMan", "[AI]") { using namespace pacman; PacManAI AI; using TestData = std::tuple, GridPosition>;