code: def onEdge(self, canvas):
          
          sides = []
          if int(self.position[0]) <= 0:
              sides.append(1)
  
          if (int(self.position[0]) + self.image.width) >= canvas.width:
              sides.append(3)
  
          if int(self.position[1]) <= 0:
              sides.append(2)
  
          if (int(self.position[1]) + self.image.height) >= canvas.height:
              sides.append(0)
  
          return sides
docs: Returns a list of the sides of the sprite
                  which are touching the edge of the canvas.
  
              0 = Bottom
              1 = Left
              2 = Top
              3 = Right