MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / _sq

Function _sq

codeclash/arenas/chess/replay.py:33–35  ·  view source on GitHub ↗

Algebraic square (e.g. 'e4') -> (row, col), row 0 = rank 8.

(s: str)

Source from the content-addressed store, hash-verified

31
32
33def _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
38def _white(p: str) -> bool:

Callers 1

_applyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected