|
|
@ -43,7 +43,7 @@ class Bingo: |
|
|
|
self.winning_score = self.calculate_score(board, draw) |
|
|
|
return self.winning_score |
|
|
|
|
|
|
|
return 0 |
|
|
|
return self.winning_score |
|
|
|
|
|
|
|
def _draw(self) -> int: |
|
|
|
for draw in self.draws: |
|
|
@ -59,10 +59,7 @@ class Bingo: |
|
|
|
# Solved if any row or column is 0 |
|
|
|
cols = np.nansum(board, axis=0) |
|
|
|
rows = np.nansum(board, axis=1) |
|
|
|
if np.count_nonzero(cols) != cols.size or np.count_nonzero(rows) != rows.size: |
|
|
|
return True |
|
|
|
|
|
|
|
return False |
|
|
|
return (np.count_nonzero(cols) != cols.size or np.count_nonzero(rows) != rows.size) |
|
|
|
|
|
|
|
|
|
|
|
def part1(inputs: str) -> int: |
|
|
|