Yannick
10/05/2021, 7:53 AMRick Lamers
10/05/2021, 8:02 AMisinstance("", int | str)
https://www.python.org/dev/peps/pep-0604/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
Structural pattern matching ☑️Abid
10/05/2021, 8:46 AMYannick
10/05/2021, 8:52 AMRick Lamers
10/05/2021, 1:24 PM