-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConstantes.py
More file actions
107 lines (75 loc) · 2.24 KB
/
Constantes.py
File metadata and controls
107 lines (75 loc) · 2.24 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
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
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 24 21:17:38 2018
@author: Clément.SAWCZUK
"""
class Constante:
""" Classe contenant l'ensemble des constantes utilisées dans le jeu.
"""
#----------------------------------------Constantes map
xmax = 15
ymax = 15
assert(xmax%2 !=0)
assert(ymax%2 !=0)
# !!!! xmax, ymax doivent être impairs!
if int(xmax/2)%2 == 0:
L_Z_Constructible= int(xmax/2)+1
else :
L_Z_Constructible= int(xmax/2)
if int(ymax/2)%2 == 0:
H_Z_Constructible= int(ymax/2)+1
else:
H_Z_Constructible= int(ymax/2)
# L_Z_Constructible = 9
# H_Z_Constructible = 11
Ep_app = int(max(xmax,ymax)/20)
#----------------------------------------Constantes ressources de départ
metal_tot=4
energie_tot=4
nbt= 15
spawn_ress=2
#----------------------------------------Constantes Batiments
#----------------------------------Foreuse
cout_M_F=2
cout_E_F=3
prod_M_F=1
#----------------------------------Panneau solaire
cout_M_P=2
cout_E_P=2
prod_E_P=3
#----------------------------------QG
prod_E_QG = 1
prod_M_QG = 1
nbe_unite_ajoute = 1 #0.5
#----------------------------------------Constantes Unites
#-------------------------------Robot combat
capmvt_RC = 1
cout_M_RC = 3
cout_E_RC = 3
capcbt_RC = 4
#------------------------------Robot Ouvrier
capmvt_RO = 2
cout_M_RO = 2
cout_E_RO = 2
#------------------------------Scorpion0
capmvt_S0 = 2
capcbt_S0 = 1
#-----------------------------Scorpion
capmvt_S = 2
capcbt_S = 1
#-------------------------------------------- Valeurs chargées
xL = 20
yL = 20
if int(xL/2)%2 == 0:
LL_Z_Constructible= int(xL/2)+1
else :
LL_Z_Constructible= int(xL/2)
if int(yL/2)%2 == 0:
LH_Z_Constructible= int(yL/2)+1
else:
LH_Z_Constructible= int(yL/2)
# L_Z_Constructible = 9
# H_Z_Constructible = 11
LEp_app = int(max(xL,yL)/20)
Lnbta = 1
Lnbt = 4