Skip to content

Instantly share code, notes, and snippets.

@Pharaoh00
Created December 16, 2018 23:34
Show Gist options
  • Save Pharaoh00/7e3d9e9250f8abb1a88432c35eb4af6e to your computer and use it in GitHub Desktop.
Save Pharaoh00/7e3d9e9250f8abb1a88432c35eb4af6e to your computer and use it in GitHub Desktop.
class Player:
def __init__(self, x, y): # This is the initiation for the class Player
self.x = x
self.y = y
def returnX(self):
return self.x
def returnY(self):
return self.y
player = Player(10, 10) # initiate x:10 - initiate y:10
print("This is the X: {} from the class Player.".format(player.returnX()))
print("This is the Y: {} from the class Player.".format(player.returnY()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment