-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame_dede.py
147 lines (124 loc) · 4.01 KB
/
game_dede.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
from random import randint
from time import sleep
"""
SCHNICK ✌️
SCHNACK 🖐️
SCHNUCK 👊
"""
vitorias = 0
empates = 0
derrotas = 0
def menu_de():
while True:
print("\nMake your choice:")
opcoes = ["✌️ Schnick", "🖐️ Schnack","👊 Schnuck", "🤔 SPIELANLEITUNG" , "🛑 AUSGEHEN"]
for indice,opcao in enumerate(opcoes):
print(f'{indice + 1} - {opcao}')
jogada = input("=> ")
jogada_pc = randint(1,3)
match jogada:
case "1":
jokenpo()
print("Du wählst SCHNICK ✌️")
sleep(1)
if jogada_pc == 1:
print("Der Computer wählte auch SCHNICK ✌️")
sleep(1)
empate()
elif jogada_pc == 2:
print("Der Computer wählte SCHNACK 🖐️")
sleep(1)
vitoria()
else:
print("Der Computer wählte SCHNUCK 👊")
sleep(1)
derrota()
break
case "2":
jokenpo()
print("Du wählst SCHNACK 🖐️")
sleep(1)
if jogada_pc == 1:
print("Der Computer wählte SCHNICK ✌️")
sleep(1)
derrota()
elif jogada_pc == 2:
print("Der Computer wählte auch SCHNACK 🖐️")
sleep(1)
empate()
else:
print("Der Computer wählte SCHNUCK 👊")
sleep(1)
vitoria()
break
case "3":
jokenpo()
print("Du wählst SCHNUCK 👊")
sleep(1)
if jogada_pc == 1:
print("Der Computer wählte SCHNICK ✌️")
sleep(1)
vitoria()
elif jogada_pc == 2:
print("Der Computer wählte SCHNACK 🖐️")
sleep(1)
derrota()
else:
print("Der Computer wählte auch SCHNUCK 👊")
sleep(1)
empate()
break
case "4":
print("\nSie wählen zwischen SCHNICK, SCHINACK oder SCHNUCK\n"
"Der Computer trifft ebenfalls eine Auswahl und das Ergebnis wird definiert:\n"
"SCHNICK gewinnt aus SCHNACK\n"
"SCHNACK gewinnt aus SCHNUCK\n"
"SCHNUCK gewinnt aus SCHNICK")
menu_de()
break
case "5":
print("🤩 Danke fürs Spielen! 🤩")
sleep(1)
resultado()
break
case _:
print("❗ Ungültige Auswahl. Bitte wählen Sie eine gültige Option! ❗")
def jokenpo():
sleep(1)
print("SCHNICK.. ✌️")
sleep(1)
print(".SCHNACK.🖐️")
sleep(1)
print("..SCHNUCK 👊")
sleep(1)
def vitoria():
print("😁 DU GEWINNST!!!!!!")
global vitorias
vitorias += 1
menu_de()
def derrota():
print("😖 Was für eine Schande... du hast verloren")
global derrotas
derrotas += 1
menu_de()
def empate():
print("😐 Es ist eine Zeichnung!")
global empates
empates += 1
menu_de()
def resultado():
global vitorias
global derrotas
global empates
if vitorias == 0 and empates == 0 and derrotas == 0:
print("🚨 Leider ist kein Punktestand vorhanden 🚨")
else:
print()
print("=" * 45)
print("✨✨✨ SPIELERGEBNISSE ✨✨✨".center(40))
print("=" * 45)
print()
print(f"😁 SIEGE: \t\t{vitorias}\n"
f"😖 NIEDERLAGEN: \t{derrotas}\n"
f"😐 KRAWATTEN: \t\t{empates}\n")
print("=" * 45)