Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Werwolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lukas Weichelt
Werwolf
Commits
bb46efb4
Commit
bb46efb4
authored
5 years ago
by
jakobkir
Browse files
Options
Downloads
Patches
Plain Diff
added witch and hunter and armor
parent
44e69faa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game.py
+0
-48
0 additions, 48 deletions
game.py
werwolf.py
+111
-0
111 additions, 0 deletions
werwolf.py
with
111 additions
and
48 deletions
game.py
deleted
100644 → 0
+
0
−
48
View file @
44e69faa
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 {}!
\n
Drü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.
\n
Er war ein {}!
"
.
format
(
list
(
remain
.
keys
())[
0
],
remain
[
list
(
remain
.
keys
())[
0
]]))
\ No newline at end of file
This diff is collapsed.
Click to expand it.
werwolf.py
0 → 100644
+
111
−
0
View file @
bb46efb4
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
"
)
if
input
(
"
Hexe?(j/n):
"
)
==
"
j
"
:
l
.
append
(
"
Hexi
"
)
hexe_h
=
True
hexe_k
=
True
if
input
(
"
Jäger?(j/n):
"
)
==
"
j
"
:
l
.
append
(
"
Jäger
"
)
if
input
(
"
Armor?(j/n):
"
)
==
"
j
"
:
l
.
append
(
"
Armor
"
)
random
.
shuffle
(
l
)
remain
=
{}
for
o
in
l
:
input
()
print
(
"
\n
"
*
100
)
name
=
input
(
"
Wer bist du?:
"
)
print
(
"
Du bist ein {}!
\n
Drück Enter und geb das Handy weiter!
"
.
format
(
o
))
remain
[
name
]
=
o
time
.
sleep
(
1
)
def
kill
(
name
):
global
lovers
v_
=
None
if
remain
[
name
]
==
"
Jäger
"
:
while
(
not
v_
in
remain
.
keys
()):
v_
=
input
(
"
Opfer:
"
)
kill
(
v_
)
print
(
name
+
"
starb
"
)
print
(
name
+
"
war ein
"
+
remain
[
name
])
del
(
remain
[
name
])
if
name
in
lovers
:
lovers
.
remove
(
name
)
print
(
"
Armor war am Werk!
"
)
k_
=
lovers
[
0
]
lovers
=
[]
kill
(
k_
)
input
(
"
\n
"
*
100
+
"
Drücke Enter für den Armor...
"
)
v
=
""
lovers
=
[]
while
(
not
v
in
remain
.
keys
()):
v
=
input
(
"
Person 1:
"
)
lovers
.
append
(
v
)
v
=
""
while
(
not
v
in
remain
.
keys
())
and
(
not
v
==
lovers
[
0
]):
v
=
input
(
"
Person 2:
"
)
lovers
.
append
(
v
)
print
(
"
\n
"
*
100
)
v
=
""
while
len
(
remain
)
>
1
:
print
(
"
\n
"
*
100
)
print
(
"
Es wird nacht...
"
)
time
.
sleep
(
0.5
)
if
"
Wolfi
"
in
[
t
[
1
]
for
t
in
remain
.
items
()]:
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
=
""
if
"
Hexi
"
in
[
k
[
1
]
for
k
in
remain
.
items
()]:
print
(
"
\n
"
*
100
)
input
(
"
Drücke Enter für die Hexe
"
)
time
.
sleep
(
1
)
if
hexe_h
:
a
=
input
(
v
+
"
wird sterben. Willst du ihn/sie wiederbeleben?(j/n):
"
)
if
a
==
"
j
"
:
v
=
""
hexe_h
=
False
if
hexe_k
:
while
(
not
a
in
remain
)
and
a
!=
""
:
a
=
input
(
"
Wen willst du töten?(leer lassen für niemanden):
"
)
if
remain
.
get
(
"
Hexi
"
)
==
a
or
a
==
v
:
continue
else
:
if
a
!=
""
:
kill
(
a
)
break
print
(
"
\n
"
*
100
)
print
(
"
Es wird Tag...
"
)
time
.
sleep
(
1
)
if
v
!=
""
:
print
(
"
Alle erwachen
"
)
kill
(
v
)
else
:
print
(
"
Alle erwachen. Niemand ist tot!
"
)
for
c
in
list
(
remain
):
print
(
"
{} lebt noch
"
.
format
(
c
))
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?:
"
)
kill
(
v
)
time
.
sleep
(
1
)
try
:
print
(
"
{} hat gewonnen.
\n
Er war ein {}!
"
.
format
(
list
(
remain
.
keys
())[
0
],
remain
[
list
(
remain
.
keys
())[
0
]]))
except
:
print
(
"
lmao you died
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment