Round doesn't make sense

This commit is contained in:
Patricia Aas 2021-07-06 17:11:49 +02:00
parent 9bea9fdad9
commit 742f4ce56a
1 changed files with 2 additions and 2 deletions

View File

@ -68,10 +68,10 @@ void PacMan::updateMazePosition(std::chrono::milliseconds time_delta, const Boar
const size_t right = COLUMNS - 1;
const size_t left = 0;
if (std::round(pos.x) == right && direction == Direction::RIGHT) {
if (std::size_t(pos.x) == right && direction == Direction::RIGHT) {
pos.x = left;
return;
} else if (std::round(pos.x) == left && direction == Direction::LEFT) {
} else if (std::size_t(pos.x) == left && direction == Direction::LEFT) {
pos.x = right;
return;
}