From 217b6105fd3874ff2ceab0d6f1408e522c94ed9c Mon Sep 17 00:00:00 2001 From: ErfanFaravani Date: Sat, 8 Feb 2020 19:11:16 +0330 Subject: [PATCH] name fixed ai info added --- AI.py | 6 ++++-- world.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/AI.py b/AI.py index 4c9dae8..0c90603 100644 --- a/AI.py +++ b/AI.py @@ -1,5 +1,5 @@ class AI: - # this function is called in the beginning for deck picking and preprocess + # this function is called in the beginning for deck picking and pre process def pick(self, world): print("pick") # self.path_to_friend_check(world) @@ -35,6 +35,8 @@ def turn(self, world): print("its turn 2!!!") world.put_unit(base_unit=world.get_me().hand[0], path=world.get_me().paths_from_player[0]) - # + # it is called after the game ended and it does not affect the game. + # using this function you can access the result of the game. + # scores is a map from int to int which the key is player_id and value is player_score def end(self, world, scores): print("ending") diff --git a/world.py b/world.py index 89a1fe6..2b0f73d 100644 --- a/world.py +++ b/world.py @@ -296,10 +296,10 @@ def _pre_process_shortest_path(self): def path_count(path): shortest_path_to_cell = [] shortest_path_to_cell_num = [] - for i in range(self.map.row_count): + for i in range(self.map.row_num): l = [] s = [] - for j in range(self.map.column_count): + for j in range(self.map.column_num): l.append(-1) s.append(-1) shortest_path_to_cell.append(l)