king_attacked method

bool king_attacked(
  1. Color color
)

Says whether the king of the given color is attacked.

Implementation

bool king_attacked(Color color) {
  return attacked(swap_color(color), kings[color]);
}