Add a hint

This commit is contained in:
Corentin Jabot 2021-10-05 16:25:35 +02:00
parent a450e52f5f
commit dd42f10fd9

View file

@ -44,6 +44,15 @@ Use the [std::sort](https://en.cppreference.com/w/cpp/algorithm/sort) function t
</details>
</details>
<details>
<summary>Hint 3</summary>
[std::sort](https://en.cppreference.com/w/cpp/algorithm/sort) third parameter should be a lambda taking 2 `GridPosition` as parameter,
and return true if the first parameter is closer from PacMan than the second.
</details>
### Part 2
Implement [PacManAI::isValidMove](../../../lib/PacManAI.cpp) and test your implementation with the test
@ -68,11 +77,11 @@ in [testPacmanAI.cpp](../../../test/testPacmanAI.cpp) called _"Is optimal direct
```cpp
Direction PacManAI::optimalDirection(const std::array<Move, 4> & moves) {
return Direction::NONE;
}
}
```
<details>
<summary>Hint</summary>
</details>