adjust image loading to new structure
This commit is contained in:
parent
5469278f88
commit
e148f98bc7
64
src/const.py
64
src/const.py
@ -16,49 +16,41 @@ HEIGHT = 800
|
||||
IMAGES = []
|
||||
|
||||
for name, val in {
|
||||
'grass_01': 0,
|
||||
'grass_02': 1,
|
||||
'dry ground_01': 2,
|
||||
'concrete_01': 3,
|
||||
'concrete_02': 4,
|
||||
'grass_01_rock': 0,
|
||||
'grass_02_rock': 1,
|
||||
'grass_01_mineAT_01': 0,
|
||||
'grass_01_mineAP_02': 0,
|
||||
'grass_01_mineAP_03': 0,
|
||||
'grass_01_mineAT_04': 0,
|
||||
'grass_01_mineADM': 0,
|
||||
'grass_02_mineAT_01': 1,
|
||||
'grass_02_mineAP_02': 1,
|
||||
'grass_02_mineAP_03': 1,
|
||||
'grass_02_mineADM': 1,
|
||||
'grass': 0,
|
||||
'dry ground': 1,
|
||||
'concrete': 2,
|
||||
'mud_01': 0,
|
||||
'mud_02': 1,
|
||||
'dry ground_01_mineADM': 2,
|
||||
'dry ground_01_mineAP_02': 2,
|
||||
'dry ground_01_mineAP_03': 2,
|
||||
'dry ground_01_mineAT_01': 2,
|
||||
'dry ground_01_mineAT_04': 2,
|
||||
'dry ground_01_rock_01': 2,
|
||||
'dry ground_01_rock_02': 2,
|
||||
'concrete_01_mineAT_01': 3,
|
||||
'concrete_01_mineAP_02': 3,
|
||||
'concrete_01_mineAP_03': 3,
|
||||
'concrete_01_mineAT_04': 3,
|
||||
'concrete_01_mineADM': 3,
|
||||
'concrete_02_mineAT_01': 4,
|
||||
'concrete_02_mineAP_02': 4,
|
||||
'concrete_02_mineAP_03': 4,
|
||||
'concrete_02_mineADM': 4,
|
||||
'grass_mineAT_01': 0,
|
||||
'grass_mineAP_02': 0,
|
||||
'grass_mineAP_03': 0,
|
||||
'grass_mineAT_04': 0,
|
||||
'grass_mineADM': 0,
|
||||
'dry ground_mineADM': 1,
|
||||
'dry ground_mineAP_02': 1,
|
||||
'dry ground_mineAP_03': 1,
|
||||
'dry ground_mineAT_01': 1,
|
||||
'dry ground_mineAT_04': 1,
|
||||
'concrete_mineAT_01': 2,
|
||||
'concrete_mineAP_02': 2,
|
||||
'concrete_mineAP_03': 2,
|
||||
'concrete_mineAT_04': 2,
|
||||
'concrete_mineADM': 2,
|
||||
'concrete_rock_01': 2,
|
||||
'concrete_rock_02': 2,
|
||||
'grass_rock_01': 0,
|
||||
'grass_rock_02': 0,
|
||||
'dry ground_rock_01': 1,
|
||||
'dry ground_rock_02': 1,
|
||||
}.items():
|
||||
folder_name = name.split('_')[0]
|
||||
path = f'{main_path}/images/Tiles/{folder_name} Tiles'
|
||||
IMAGES.append(
|
||||
Image(
|
||||
val,
|
||||
name,
|
||||
pg.image.load(
|
||||
f'{main_path}/images/Tiles/{folder_name} Tiles/{name}.png'
|
||||
),
|
||||
f'{path}/big/{name}.png',
|
||||
pg.image.load(f'{path}/small/{name}.png'),
|
||||
None if 'mine' not in name else (
|
||||
'AP' if 'AP' in name else (
|
||||
'AT' if 'AT' in name else 'ADM'
|
||||
@ -91,7 +83,7 @@ for name in [
|
||||
f'{main_path}/images/agent/agent_kaboom/{name}.png'
|
||||
))
|
||||
|
||||
ROCK_INDEXES = (5, 6, 23, 24)
|
||||
ROCK_INDEXES = ( 20, 21, 22, 23, 24, 25)
|
||||
|
||||
try:
|
||||
with open(f'{main_path}/src/machine_learning/decision_tree/decision_tree.pkl', 'rb') as file:
|
||||
|
Loading…
Reference in New Issue
Block a user