예제 #1
0
 public ChessGame(
     IBoardEngineProvider <ChessPieceEntity> boardEngineProvider,
     IBoardEntityFactory <ChessPieceEntity> entityFactory,
     ICheckDetectionService checkDetectionService
     )
     : this(boardEngineProvider, checkDetectionService, new ChessBoardSetup(entityFactory))
 {
 }
예제 #2
0
 public ChessGameTrigger(
     IBoardEngineProvider <ChessPieceEntity> boardEngineProvider,
     IBoardSetup <ChessPieceEntity> boardSetup,
     ICheckDetectionService checkDetectionService
     )
 {
     _boardSetup            = boardSetup;
     _boardEngineProvider   = boardEngineProvider;
     _checkDetectionService = checkDetectionService;
 }
예제 #3
0
        public ChessGame(
            IBoardEngineProvider <ChessPieceEntity> boardEngineProvider,
            ICheckDetectionService checkDetectionService,
            IBoardSetup <ChessPieceEntity> setup,
            Colours whoseTurn = Colours.White)
        {
            _engine = boardEngineProvider.Provide(setup, (int)whoseTurn);

            _checkDetectionService = checkDetectionService;
            _engine.CurrentPlayer  = (int)whoseTurn;
            CheckState             = _checkDetectionService.Check(BoardState);
        }
예제 #4
0
 public ChessGameService(
     ILogger <ChessGameService> logger,
     ILogger <ChessGame> chessGameLogger,
     ICheckDetectionService checkDetectionService,
     IBoardEngineProvider <ChessPieceEntity> boardEngineProvider,
     IBoardEntityFactory <ChessPieceEntity> entityFactory
     )
 {
     _checkDetectionService = checkDetectionService;
     _entityFactory         = entityFactory;
     _chessGameLogger       = chessGameLogger;
     _boardEngineProvider   = boardEngineProvider;
     _logger = logger;
 }