Ejemplo n.º 1
0
        public HashSet <Piece> SetUpPiecesByColor(Color color, Dictionary <CoOrdinate, Piece> initialPiecesByCorOrdinate)
        {
            PieceFactory    pieceFactory  = new PieceFactory();
            HashSet <Piece> piecesByColor = new HashSet <Piece>();

            _boardState.SetUpState(pieceFactory.Get(PieceType.Bishop).SetUp(color), initialPiecesByCorOrdinate, piecesByColor);
            _boardState.SetUpState(pieceFactory.Get(PieceType.King).SetUp(color), initialPiecesByCorOrdinate, piecesByColor);
            _boardState.SetUpState(pieceFactory.Get(PieceType.Knight).SetUp(color), initialPiecesByCorOrdinate, piecesByColor);
            _boardState.SetUpState(pieceFactory.Get(PieceType.Pawn).SetUp(color), initialPiecesByCorOrdinate, piecesByColor);
            _boardState.SetUpState(pieceFactory.Get(PieceType.Queen).SetUp(color), initialPiecesByCorOrdinate, piecesByColor);
            _boardState.SetUpState(pieceFactory.Get(PieceType.Rook).SetUp(color), initialPiecesByCorOrdinate, piecesByColor);
            return(piecesByColor);
        }