private BoardState(IPathsValidator <TEntity> pathsValidator, IEnumerable <LocatedItem <TEntity> > clonedItems) { _items = clonedItems?.ToDictionary(k => k.Location, k => k) ?? new Dictionary <BoardLocation, LocatedItem <TEntity> >(); _pathsValidator = pathsValidator; }
public BoardEngine(IBoardSetup <TEntity> boardSetup, IPathsValidator <TEntity> pathsValidator, IBoardMoveService <TEntity> boardMoveService ) : this(boardSetup, pathsValidator, boardMoveService, new DefaultRefreshAllPaths(), 0) { }
public ChessBoardEngineProvider( IRefreshAllPaths <ChessPieceEntity> refreshAllPaths, IPathsValidator <ChessPieceEntity> chessPathsValidator, IBoardMoveService <ChessPieceEntity> boardMoveService ) { _boardMoveService = boardMoveService; _chessPathsValidator = chessPathsValidator; _refreshAllPaths = refreshAllPaths; }
public CheckDetectionService( IPlayerStateService playerStateService, IBoardMoveService <ChessPieceEntity> moveService, IFindAttackPaths findAttackPaths, IPathsValidator <ChessPieceEntity> pathsValidator ) { _moveService = moveService; _playerStateService = playerStateService; _pathFinder = findAttackPaths; _pathsValidator = pathsValidator; }
public BoardEngine(IBoardSetup <TEntity> boardSetup, IPathsValidator <TEntity> pathsValidator, IBoardMoveService <TEntity> boardMoveService, IRefreshAllPaths <TEntity> refreshAllPaths, int currentPlayer) { CurrentPlayer = currentPlayer; _boardMoveService = boardMoveService; BoardState = new BoardState <TEntity>(pathsValidator); _boardSetup = boardSetup; _boardSetup.SetupPieces(this); _refreshAllPaths = refreshAllPaths; _refreshAllPaths.RefreshAllPaths(BoardState, CurrentPlayer); }
public BoardState(IPathsValidator <TEntity> pathsValidator ) : this(pathsValidator, null) { }
public PlayerStateService(IFindAttackPaths findAttackPaths, IPathsValidator <ChessPieceEntity> pathsValidator) { _pathFinder = findAttackPaths; _pathsValidator = pathsValidator; }