private static void MakeBishopMoves(PlayerPieceSet my_pieces, PlayerPieceSet other_pieces, List<Move> moves) { for (uint i = 0, e = my_pieces.BishopsCount; i < e; ++i) { uint cell_index; int cell = my_pieces.GetBishopCell(i, out cell_index); MakeDiagonalMoves(Exports.Pieces.Bishop, my_pieces, other_pieces, cell, cell_index, moves); } }
private void AddPieces(PlayerPieceSet pieces, Players player) { Debug.Assert(pieces != null); AddPiece(player, Exports.Pieces.King, pieces.KingsCell); for (uint i = 0, e = pieces.QueensCount; i < e; ++i) { AddPiece(player, Exports.Pieces.Queen, pieces.GetQueenCell(i)); } for (uint i = 0, e = pieces.RooksCount; i < e; ++i) { AddPiece(player, Exports.Pieces.Rook, pieces.GetRookCell(i)); } for (uint i = 0, e = pieces.BishopsCount; i < e; ++i) { AddPiece(player, Exports.Pieces.Bishop, pieces.GetBishopCell(i)); } for (uint i = 0, e = pieces.KnightsCount; i < e; ++i) { AddPiece(player, Exports.Pieces.Knight, pieces.GetKnightCell(i)); } for (uint i = 0, e = pieces.PawnsCount; i < e; ++i) { AddPiece(player, Exports.Pieces.Pawn, pieces.GetPawnCell(i)); } }