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));
     }
 }
 private static void MakeRookMoves(PlayerPieceSet my_pieces,
     PlayerPieceSet other_pieces, List<Move> moves)
 {
     for (uint i = 0, e = my_pieces.RooksCount; i < e; ++i)
     {
         MakeHorizVertMoves(Exports.Pieces.Rook, my_pieces, other_pieces,
             my_pieces.GetRookCell(i), moves);
     }
 }