Skip to content

Commit

Permalink
_spell_dict is now an instance variable
Browse files Browse the repository at this point in the history
  • Loading branch information
HamidrezaKmK committed Mar 7, 2020
1 parent 76a007b commit 2bf8185
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion AI.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def __init__(self):
# this function is called in the beginning for deck picking and pre process
def pick(self, world: World):
print("pick started!")

# pre process
map = world.get_map()
self.rows = map.row_num
Expand Down
2 changes: 1 addition & 1 deletion model.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class Player:
spells: List["Spell"]
range_upgraded_unit: Optional["Unit"]
damage_upgraded_unit: Optional["Unit"]

_spells_dict: Dict[int, int] = {}

def __init__(self, player_id: int, deck: List["BaseUnit"], hand: List["BaseUnit"], ap: int, king: "King",
Expand All @@ -84,6 +83,7 @@ def __init__(self, player_id: int, deck: List["BaseUnit"], hand: List["BaseUnit"
self.spells = spells
self.range_upgraded_unit = range_upgraded_unit # unit that last turn the player upgraded range of it
self.damage_upgraded_unit = damage_upgraded_unit # unit that last turn the player upgraded damage of it
self._spells_dict = {}

def is_alive(self) -> bool:
return self.king.is_alive
Expand Down

0 comments on commit 2bf8185

Please sign in to comment.