-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvar_global.py
More file actions
78 lines (61 loc) · 3.17 KB
/
Copy pathvar_global.py
File metadata and controls
78 lines (61 loc) · 3.17 KB
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
"""
Definição das variáveis globais
"""
from glob import glob
from jogadas import jogada_dados_diff
from def_cores import *
# Variáveis que determina a cores das peças
# Círculo branco
PC_CLARA = COR_BRANCO + "●"
# Círculo preto
PC_ESCURA = COR_PRETO + "●"
# Círculo pontilhado branco
PC_NULA = COR_BRANCO + "◌"
# Barra azul
CS_CLARA = COR_AZUL + "|" + COR_RESETALL
# Barra vermelha
CS_ESCURA = COR_VERMELHO + "|" + COR_RESETALL
# Barra verde
CS_MEIO = COR_VERDE + "|" + COR_RESETALL
# Matriz com os elementos das peças distribuídas no tabuleiro
pecas_posi = [[PC_CLARA, PC_CLARA, PC_NULA, PC_NULA, PC_NULA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_ESCURA, PC_ESCURA, PC_ESCURA, PC_ESCURA, PC_ESCURA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_ESCURA, PC_ESCURA, PC_ESCURA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_CLARA, PC_CLARA, PC_CLARA, PC_CLARA, PC_CLARA],
[PC_ESCURA, PC_ESCURA, PC_ESCURA, PC_ESCURA, PC_ESCURA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_CLARA, PC_CLARA, PC_CLARA, PC_NULA, PC_NULA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_CLARA, PC_CLARA, PC_CLARA, PC_CLARA, PC_CLARA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA],
[PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA], [PC_ESCURA, PC_ESCURA, PC_NULA, PC_NULA, PC_NULA]]
# Lista das peças capturadas
pecas_capturadas_claras = [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA]
pecas_capturadas_escuras = [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA]
# Lista das peças que foram retiradas do jogo e suas variáveis que sinaliza o fim de jogo retirando as 15 peças
pecas_retiradas_claras = [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA,
PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA,
PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA]
pecas_retiradas_escuras = [PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA,
PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA,
PC_NULA, PC_NULA, PC_NULA, PC_NULA, PC_NULA]
pecas_retiradas_claras_quant = 0
pecas_retiradas_escuras_quant = 0
# Lista das peças sobrepostas por casa
pecas_sobre = [[PC_NULA]] * 24
pecas_sobre_quant = [1] * 24
# Variáveis dos valores de dados
dado_1 = 1
dado_2 = 1
# Variável que sinaliza qual dado foi usado para o retorno de uma peça capturada
# ou para o movimento de uma peça
dado_usado = 0
# Variável para contar a quantidade de jogadas
cont_jogadas = 0
# Variáveis para sinalizar quem é o jogador da vez
jog_1 = True
jog_2 = False
# Variáveis contendo os nomes dos jogadores
jogador_1 = ""
jogador_2 = ""