Skip to content

Instantly share code, notes, and snippets.

@MartinThoma
Created October 2, 2021 10:08
Show Gist options
  • Save MartinThoma/0dc07940966567bfe8f189620107d972 to your computer and use it in GitHub Desktop.
Save MartinThoma/0dc07940966567bfe8f189620107d972 to your computer and use it in GitHub Desktop.
match command.split():
case ["quit"]:
print("Goodbye!")
quit_game()
case ["look"]:
current_room.describe()
case ["get", obj]:
character.get(obj, current_room)
case ["go", direction]:
current_room = current_room.neighbor(direction)
# The rest of your commands go here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment