Skip to content

Commit

Permalink
name fixed
Browse files Browse the repository at this point in the history
ai info added
  • Loading branch information
erfanfi79 committed Feb 8, 2020
1 parent 23e860b commit 217b610
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions AI.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
4 changes: 2 additions & 2 deletions world.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 217b610

Please sign in to comment.