kingAttacked method Null safety

bool kingAttacked(
  1. Color color
)

Implementation

bool kingAttacked(Color color) {
  return attacked(swapColor(color), kings[color]);
}