fahren
This commit is contained in:
@@ -15,3 +15,4 @@ class Avatar:
|
|||||||
|
|
||||||
print(str(self.fahrzeug))
|
print(str(self.fahrzeug))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+29
-9
@@ -59,17 +59,37 @@ print("Go!")
|
|||||||
|
|
||||||
print(spieler.name + " fährt...")
|
print(spieler.name + " fährt...")
|
||||||
|
|
||||||
|
running = True
|
||||||
|
while running == True:
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
event = random.randint(0,1)
|
item = random.randint(1,3)
|
||||||
|
|
||||||
|
if item == 1:
|
||||||
|
item = Stern
|
||||||
|
elif item == 2:
|
||||||
|
item = Rakete
|
||||||
|
elif item == 3:
|
||||||
|
item = Pilz
|
||||||
|
|
||||||
|
|
||||||
item = random.randint(1,3)
|
|
||||||
|
|
||||||
if item == 1:
|
event = random.randint(0,1)
|
||||||
item = Stern
|
|
||||||
elif item == 2:
|
|
||||||
item = Rakete
|
|
||||||
elif item == 3:
|
|
||||||
item = Pilz
|
|
||||||
|
|
||||||
print(str(item))
|
if event == 0:
|
||||||
|
richtung = input("Kreuzung! Fahre nach links, rechts oder geradeaus: ")
|
||||||
|
if richtung == "links":
|
||||||
|
print(spieler.name + " fährt nach links!")
|
||||||
|
elif richtung == "rechts":
|
||||||
|
print(spieler.name + " fährt nach rechts!")
|
||||||
|
elif richtung == "geradeaus":
|
||||||
|
print(spieler.name + " fährt geradeaus!")
|
||||||
|
else:
|
||||||
|
print(spieler.name + " ist aus der Welt gefallen und hat das Spiel verloren.")
|
||||||
|
running = False
|
||||||
|
if event == 1:
|
||||||
|
event = item
|
||||||
|
print(str(item))
|
||||||
|
if item.name == "Stern":
|
||||||
|
print(spieler.name + " überholt drei Gegner!")
|
||||||
|
elif item.name == ""
|
||||||
Reference in New Issue
Block a user