4 ms·
Similarily, it should not be too hard to implement checkmate. If, on your move, any of the opponent pieces can capture your king and this remains true wherever
by gliptic 4y ago
Similarily, it should not be too hard to implement checkmate. If, on your move, any of the opponent pieces can capture your king and this remains true wherever the king moves, you're mated. Should only require overlap detection between linear and circular swept discs. EDIT: Ok, a bit more complex than that, but still doable I think. Find a point on the king movement lines that are at least one radius away from the union of the capture areas.
You would also not be allowed to move the king anywhere where the opponent can capture it.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]