Optimized RobotPeer.checkWallCollision()