* Dequeues the next path direction. Ie returns the direction and removes it from queue. * @return Direction where the unit needs to go next, -1 if it's the end of the path. */
| 530 | * @return Direction where the unit needs to go next, -1 if it's the end of the path. |
| 531 | */ |
| 532 | int Pathfinding::dequeuePath() |
| 533 | { |
| 534 | if (_path.empty()) return -1; |
| 535 | int last_element = _path.back(); |
| 536 | _path.pop_back(); |
| 537 | return last_element; |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * Aborts the current path. Clears the path vector. |
no test coverage detected