This commit is contained in:
alstergym
2026-09-10 10:15:28 +02:00
parent f3c6cc72c0
commit bfb909ba3e
2 changed files with 30 additions and 9 deletions
+1
View File
@@ -15,3 +15,4 @@ class Avatar:
print(str(self.fahrzeug))
+23 -3
View File
@@ -59,9 +59,9 @@ print("Go!")
print(spieler.name + " fährt...")
event = random.randint(0,1)
running = True
while running == True:
time.sleep(1)
item = random.randint(1,3)
@@ -72,4 +72,24 @@ elif item == 2:
elif item == 3:
item = Pilz
event = random.randint(0,1)
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 == ""