original_docstring: Evaluate the object's current position, change the object's velocity if it collided with a wall.
          
docstring: Evaluate the object's current position, change the object's velocity if it collided with a wall.
docstring_tokens: Evaluate the object ' s current position change the object ' s velocity if it collided with a wall .
code: def checkCollisionBounds(self):
          """Evaluate the object's current position, change the object's velocity if it collided with a wall.
          """
          if self.pos[0] < self.bounds[0][0]: #left
              self.pos[0] = self.bounds[0][0]
              self.velocity[0] *= -1
              self.bounces += 1
          if self.pos[0] > self.bounds[0][1]:#right
              self.pos[0] = self.bounds[0][1]
              self.velocity[0] *= -1
              self.bounces += 1
          if self.pos[1] > self.bounds[1][0]: #top.   ±
              self.pos[1] = self.bounds[1][0]
              self.velocity[1] *= -1
              self.bounces += 1
          if self.pos[1] < self.bounds[1][1]: #bottom
              self.pos[1] = self.bounds[1][1]
              self.velocity[1] *= -1
              self.bounces += 1
code_tokens: def checkCollisionBounds ( self ) : if self . pos [ 0 ] < self . bounds [ 0 ] [ 0 ] : self . pos [ 0 ] = self . bounds [ 0 ] [ 0 ] self . velocity [ 0 ] *= - 1 self . bounces += 1 if self . pos [ 0 ] > self . bounds [ 0 ] [ 1 ] : self . pos [ 0 ] = self . bounds [ 0 ] [ 1 ] self . velocity [ 0 ] *= - 1 self . bounces += 1 if self . pos [ 1 ] > self . bounds [ 1 ] [ 0 ] : self . pos [ 1 ] = self . bounds [ 1 ] [ 0 ] self . velocity [ 1 ] *= - 1 self . bounces += 1 if self . pos [ 1 ] < self . bounds [ 1 ] [ 1 ] : self . pos [ 1 ] = self . bounds [ 1 ] [ 1 ] self . velocity [ 1 ] *= - 1 self . bounces += 1
short_docstring: Evaluate the object's current position, change the object's velocity if it collided with a wall.
short_docstring_tokens: Evaluate the object ' s current position change the object ' s velocity if it collided with a wall .
comment: """Evaluate the object's current position, change the object's velocity if it collided with a wall.
          """$SEP$#left$SEP$#right$SEP$#top.   ±$SEP$#bottom