Calculates the score for a move based on the number of elements removed. >>> increment_score(3) 6 >>> increment_score(0) 0
(count: int)
| 162 | |
| 163 | |
| 164 | def increment_score(count: int) -> int: |
| 165 | """ |
| 166 | Calculates the score for a move based on the number of elements removed. |
| 167 | |
| 168 | >>> increment_score(3) |
| 169 | 6 |
| 170 | >>> increment_score(0) |
| 171 | 0 |
| 172 | """ |
| 173 | return int(count * (count + 1) / 2) |
| 174 | |
| 175 | |
| 176 | def move_x(matrix_g: list[list[str]], column: int, size: int) -> list[list[str]]: |