ein Problem, dass ich einfach nicht gelöst bekomme. :K
Für die meisten von euch dürfte das einfach sein. Ich will so eine art
Text-Adventure programmieren und habe das event "command" schon
mit def definiert. Nur kriege ich es nicht eingebaut. (Habs schon mit bind
probiert, irgendwie gehts nicht.)
Hier der Code:
Code: Alles auswählen
print ('You wake up. You find yourself in a room, that you have never seen.')
print ("You are confused and try to remember what happened, but you can't")
print ("remember anything. There is a door NORTH and a window SOUTH.")
print ('"What should I do?", you ask yourself. Well, that is YOUR desicion!')
print (' ')
print ('______________________________________________________________________')
print (' ')
def command (event):
command = str(input('Command: '))
bind(command) #<- HIER WEIß ICH NICHT WEITER!
if command == ('go north'):
print("I stand infront of the door...")