summaryrefslogtreecommitdiffstats
path: root/4.py
diff options
context:
space:
mode:
Diffstat (limited to '4.py')
-rw-r--r--4.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/4.py b/4.py
index c75706c..5e60e52 100644
--- a/4.py
+++ b/4.py
@@ -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: