From 742f4ce56a3754b5455aa124fd729591a0163d46 Mon Sep 17 00:00:00 2001 From: Patricia Aas Date: Tue, 6 Jul 2021 17:11:49 +0200 Subject: [PATCH] Round doesn't make sense --- lib/PacMan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PacMan.cpp b/lib/PacMan.cpp index c051231..c2a13fe 100644 --- a/lib/PacMan.cpp +++ b/lib/PacMan.cpp @@ -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; }