Skip to content
Snippets Groups Projects
Commit 44e69faa authored by Lukas Weichelt's avatar Lukas Weichelt
Browse files

Initial push

Version: 0.0.1
parent 6a15a241
No related branches found
No related tags found
No related merge requests found
game.py 0 → 100644
import random, time
l = []
for i in range(0, int(input("Dorfi: "))): l.append("Dorfi")
for i in range(0, int(input("Wolfi: "))): l.append("Wolfi")
random.shuffle(l)
remain = {}
for o in l:
input()
print("\n"*100)
name = input("Wer bist du?: ")
print("Du bist ein {}!\nDrück Enter und geb das Handy weiter!".format(o))
remain[name] = o
time.sleep(1)
while len(remain) > 1:
print("\n"*100)
print("Es wird nacht...")
time.sleep(0.5)
print("Die Wölfe erwachen...")
for c in remain.keys():
if remain[c] != "Wolfi":
print(c + " kann getötet werden")
v = ""
while (not v in remain.keys()):
v = input("Opfer: ")
if v in remain.keys():
if remain[v] == "Wolfi":
v = ""
print("\n"*100)
print("Es wird Tag...")
time.sleep(1)
print("Alle erwachen. \n{} ist tot!".format(v))
print("{} war ein {}".format(v, remain[v]))
del(remain[v])
time.sleep(2)
if len(remain.keys()) == 1: continue
k = True
for c in remain.items():
k = (k and (c[1] == "Wolfi"))
if k:
break
v = ""
while (not v in remain.keys()):
v = input("Wer soll sterben?: ")
print("{} war ein {}".format(v, remain[v]))
del(remain[v])
time.sleep(1)
print("{} hat gewonnen.\nEr war ein {}!".format(list(remain.keys())[0], remain[list(remain.keys())[0]]))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment