diff --git a/maps/map1.json b/maps/map1.json index c5f09f1..8ea3ecd 100644 --- a/maps/map1.json +++ b/maps/map1.json @@ -1,6 +1,6 @@ { - "width":9, - "height":11, + "width":11, + "height":9, "player1_coordinate":[0,0], "player2_coordinate":[0,8], "player3_coordinate":[0,2], diff --git a/src/environment/env.py b/src/environment/env.py index 39b301d..641d377 100644 --- a/src/environment/env.py +++ b/src/environment/env.py @@ -84,8 +84,8 @@ def __init__(self, 'wallet': 0 }] self.input_map = input_map - self.x_size = input_map['width'] - self.y_size = input_map['height'] + self.x_size = input_map['height'] + self.y_size = input_map['width'] self.agents_cnt = agents_cnt self.rounds = rounds self.max_rounds = rounds @@ -369,8 +369,8 @@ def generate_info(self): def load_map(self): conf_dic = self.input_map - self.x_size = conf_dic["width"] - self.y_size = conf_dic["height"] + self.x_size = conf_dic["height"] + self.y_size = conf_dic["width"] self.fog_map = conf_dic["fog_map"] for i in range(self.agents_cnt): self.agents_list[i].x = conf_dic[f"player{i+1}_coordinate"][0] diff --git a/src/process/GameHandler.py b/src/process/GameHandler.py index 1bfa5f7..76a3082 100644 --- a/src/process/GameHandler.py +++ b/src/process/GameHandler.py @@ -155,8 +155,8 @@ def final_update_info(self): igd['winner'] = self.players[self.winner[0] - 1]['name'] igd['winnerId'] = self.winner[0] igd['win_reason'] = self.winner[1] - igd['map_width'] = int(self.info[0]['board'].shape[0]) - igd['map_height'] = int(self.info[0]['board'].shape[1]) + igd['map_width'] = self.map['width'] + igd['map_height'] = self.map['height'] igd['map_data'] = {} igd['map_data']['obstacle'] = self.map['walls'] igd['map_data']['fog'] = self.map['fog_map']