Пример #1
0
 protected virtual bool isEnemyKingCaptured(ChessPiece enemyKing)
 {
     return(enemyKing != null && enemyKing.Rank == "king" && !enemyKing.IsActive);
 }
Пример #2
0
 public virtual bool isGameOver(ChessPiece enemyKing, int turn)
 {
     return(isEnemyKingCaptured(enemyKing) || isKingAtFurthestRowFor2ConsecutiveTurns(turn));
 }