Example #1
0
        public static List <Move> CreatePromotionMoves(Pawn pawn, Position newPosition, bool takes)
        {
            var moves = new List <Move>();

            foreach (var promotePieceType in PromotionMove.PromotingPieceType.PromotingPieceTypes)
            {
                var promotion = new PromotionMove(pawn, newPosition, promotePieceType, takes);
                var move      = new Move(promotion);
                moves.Add(move);
            }
            return(moves);
        }
Example #2
0
 public Move(PromotionMove promotion)
 {
     Promotion = promotion;
     Type      = MoveType.Promotion;
 }