teamCanCheck method

bool teamCanCheck(
  1. int team
)

whether the team team can do checkmate 检查方是否能将军

Implementation

bool teamCanCheck(int team) {
  return fen
      .getAll()
      .any((item) => item.team == team && itemCanCheck(item.position, team));
}