Exemple #1
0
 public MoveValidator(IChessBoard chessBoard, ILegalMovement legalMovement,
                      IPromotionDetector promotionDetector)
 {
     this.chessBoard        = chessBoard;
     this.legalMovement     = legalMovement;
     this.promotionDetector = promotionDetector;
 }
Exemple #2
0
 public ChessGame(
     IChessBoard chessBoard,
     IMoveValidator moveValidator,
     IPromotionDetector promotionDetector,
     IGameFinishedDetector gameFinishedDetector,
     ILegalMovement legalMovement)
 {
     CurrentPlayer             = ChessColor.White;
     this.chessBoard           = chessBoard;
     this.moveValidator        = moveValidator;
     this.promotionDetector    = promotionDetector;
     this.gameFinishedDetector = gameFinishedDetector;
     this.legalMovement        = legalMovement;
 }