diff options
-rw-r--r-- | 4.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -18,12 +18,13 @@ class Board: def call(self, num: int) -> None: pos: tuple[int, int] | None = self.nums.pop(num, None) if pos is None: return - self.col_hits[pos[0]] -= 1 - self.row_hits[pos[1]] -= 1 + x, y = pos + self.col_hits[x] -= 1 + self.row_hits[y] -= 1 self.has_bingo = ( self.has_bingo or - not self.col_hits[pos[0]] or - not self.row_hits[pos[1]] + not self.col_hits[x] or + not self.row_hits[y] ) @property def unmarked_sum(self) -> int: |