-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReves.py
More file actions
21 lines (20 loc) · 808 Bytes
/
Reves.py
File metadata and controls
21 lines (20 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Configuracoes
from Dado import jogarDado
from random import randint
def gera_reves():
if jogarDado() % 2 == 0: # Joga o dado.. se for par eh sorte, se nao eh reves
opcao = randint(0, (len(Configuracoes.possiveis_sorte) - 1))
print("SORTE!")
for key in Configuracoes.possiveis_sorte[opcao].keys():
print(key)
for value in Configuracoes.possiveis_sorte[opcao].values():
print("+", value)
return int(value)
else:
opcao = randint(0, (len(Configuracoes.possiveis_reves) - 1))
print("REVES!")
for key in Configuracoes.possiveis_reves[opcao].keys():
print(key)
for value in Configuracoes.possiveis_reves[opcao].values():
print("-", value)
return int(value) * -1