-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTabuleiro.py
More file actions
29 lines (27 loc) · 905 Bytes
/
Tabuleiro.py
File metadata and controls
29 lines (27 loc) · 905 Bytes
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
import Configuracoes
from Terreno import Terreno
from random import randint
tabuleiro = []
def cria_tabuleiro():
for casa in range(Configuracoes.tamanho_tabuleiro):
if casa == 0:
terreno = Terreno("Inicio")
terreno.inicio_do_jogo()
elif casa == Configuracoes.pos_vai_para_cadeia:
terreno = Terreno("Para Cadeia")
terreno.vai_cadeia()
elif casa == Configuracoes.pos_Cadeia:
terreno = Terreno("Cadeia")
terreno.cadeia()
else:
opcao = randint(0, 1)
if opcao == 0:
terreno = Terreno("Terreno {num}".format(num=casa))
terreno.propriedade(randint(200,1500))
else:
terreno = Terreno("Reves")
terreno.reves()
tabuleiro.append(terreno)
cria_tabuleiro()
for casa in tabuleiro:
print(casa.nome)