Skip to content

Commit

Permalink
Update pick_augment function to avoid dummys
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony5301 committed Feb 3, 2024
1 parent 7c34c59 commit dcad881
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,9 @@ def place_items(self) -> None:

def add_item_to_champs(self, item_index: int) -> None:
"""Iterates through champions in the board and checks if the champion needs items"""
for champ_name in comps.COMP:
for champ in self.board:
if champ_name == champ.name:
if champ.does_need_items() and self.items[item_index] is not None:
self.add_item_to_champ(item_index, champ)
break
for champ in self.board:
if champ.does_need_items() and self.items[item_index] is not None:
self.add_item_to_champ(item_index, champ)

def add_item_to_champ(self, item_index: int, champ: Champion) -> None:
"""Takes item index and champ and applies the item"""
Expand Down

0 comments on commit dcad881

Please sign in to comment.