Skip to content

Instantly share code, notes, and snippets.

@lewis-carson
Created January 4, 2018 16:39
Show Gist options
  • Save lewis-carson/4e3e95fe904d1b06f671d706e8be0ff7 to your computer and use it in GitHub Desktop.
Save lewis-carson/4e3e95fe904d1b06f671d706e8be0ff7 to your computer and use it in GitHub Desktop.
class world:
def turn(self):
print('this is the world\'s turn')
class prompt:
def handle(self, command):
w.turn() #Calls worlds turn
def turn(self):
command = input('# ') #This is where the users command is prompted
p.handle(command) #calling this as a seperate function to process the input from the prompt
w = world()
p = prompt()
p.turn()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment