Algebraic square (e.g. 'e4') -> (row, col), row 0 = rank 8.
(s: str)
| 31 | |
| 32 | |
| 33 | def _sq(s: str) -> tuple[int, int]: |
| 34 | """Algebraic square (e.g. 'e4') -> (row, col), row 0 = rank 8.""" |
| 35 | return (8 - int(s[1]), ord(s[0]) - ord("a")) |
| 36 | |
| 37 | |
| 38 | def _white(p: str) -> bool: |