Skip to content

Commit

Permalink
improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Bombardier256 committed Jan 10, 2025
1 parent 253fa7c commit 3abadd7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ def __init__(
self.health = len(self.decks)

def get_deck(self, row: int, column: int) -> Deck:
return [
if result := [
deck
for deck in self.decks
if deck.row == row and deck.column == column
][0]
][0]:
return result
else:
raise IndexError

def fire(self, row: int, column: int) -> None:
if deck := self.get_deck(row, column):
Expand Down

0 comments on commit 3abadd7

Please sign in to comment.