try using a smaller map and no mountain to get more available space

This commit is contained in:
andrea
2025-07-28 23:06:19 +02:00
parent 29157e22d4
commit e0dc558c27

View File

@@ -13,7 +13,7 @@ class BrSimMap():
self.players= players or [] self.players= players or []
self.items= items or [] self.items= items or []
self.world_width= 10 #seems a reasonable width for smartphones larger maps would go on a new line self.world_width= 10 #seems a reasonable width for smartphones larger maps would go on a new line
self.world_height= 25 self.world_height= 10
self.game_map= [] self.game_map= []
self.field_sym= _bot_syms.MAP_UTF8_FIELD self.field_sym= _bot_syms.MAP_UTF8_FIELD
self.player_male_sym= _bot_syms.MAP_UTF8_PLAYER_MALE self.player_male_sym= _bot_syms.MAP_UTF8_PLAYER_MALE
@@ -37,15 +37,17 @@ class BrSimMap():
# ⛰️ this is icon for the mountain (We can prevent players from passing through the mountains and thus use them for map boundaries.) # ⛰️ this is icon for the mountain (We can prevent players from passing through the mountains and thus use them for map boundaries.)
width= [] width= []
mon = [] #mon = []
#for i in range(self.world_width):
#mon.append(self.mountain_sym)
for i in range(self.world_width): for i in range(self.world_width):
mon.append(self.mountain_sym) #if i == 0 or i == self.world_width - 1: width.append(self.mountain_sym)
for i in range(self.world_width): #else: width.append(self.field_sym)
if i == 0 or i == self.world_width - 1: width.append(self.mountain_sym) width.append(self.field_sym)
else: width.append(self.field_sym)
for i in range(self.world_height): for i in range(self.world_height):
if i == 0 or i == self.world_height - 1: self.game_map.append(mon) #if i == 0 or i == self.world_height - 1: self.game_map.append(mon)
else: self.game_map.append(_copy.deepcopy(width)) #else: self.game_map.append(_copy.deepcopy(width))
self.game_map.append(_copy.deepcopy(width))
_logs.log_debug(f'init_map_matrix: {self.game_map}') _logs.log_debug(f'init_map_matrix: {self.game_map}')
def populate_map(self): def populate_map(self):