 (
            sheepRect.left < obstacleRect.right &&
            sheepRect.right > obstacleRect.left &&
            sheepRect.top < obstacleRect.bottom &&
            sheepRect.bottom > obstacleRect.top
          ) {
            // Basic collision response: move the sheep out of the obstacle.  Could be improved.
            if (sheep.vx > 0 && sheepRect.right > obstacleRect.left && sheepRect.left < obstacleRect.left) {
              sheep.x -= sheepRect.right - obstacleRect.left;
            }
            