From 24048c387ae2f8ce5910c8df715c529e032e3154 Mon Sep 17 00:00:00 2001 From: rendo Date: Fri, 13 Mar 2026 11:31:03 +0500 Subject: [PATCH] uniform teleportation --- src/pacman.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pacman.cpp b/src/pacman.cpp index 2f3a41f..56056e3 100644 --- a/src/pacman.cpp +++ b/src/pacman.cpp @@ -55,10 +55,10 @@ void Pacman::tick() { if (this->position.y < world.bound_offset*CELL_SIZE){ this->position.y += world.height-2*world.bound_offset*CELL_SIZE; } - if (this->position.x >= world.width-(world.bound_offset-1)*CELL_SIZE){ + if (this->position.x >= world.width-world.bound_offset*CELL_SIZE){ this->position.x -= world.width-2*world.bound_offset*CELL_SIZE; } - if (this->position.y >= world.height-(world.bound_offset-1)*CELL_SIZE){ + if (this->position.y >= world.height-world.bound_offset*CELL_SIZE){ this->position.y -= world.height-2*world.bound_offset*CELL_SIZE; } }