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

Function _king

codeclash/arenas/chess/replay.py:81–87  ·  view source on GitHub ↗
(board, white: bool)

Source from the content-addressed store, hash-verified

79
80
81def _king(board, white: bool):
82 k = "K" if white else "k"
83 for r in range(8):
84 for c in range(8):
85 if board[r][c] == k:
86 return (r, c)
87 return None
88
89
90def _reaches(board, piece, fr, fc, tr, tc, ep) -> bool:

Callers 1

_applyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected