示例#1
0
        private void PawnPromotion(IMove move, Piece pieceWhoMoves)
        {
            Piece wp = null;

            wp = GetPawnByColor(pieceWhoMoves, wp);
            if (wp.IsPromoted)
            {
                IArmy army = board.GetArmy(color);
                army.CapturedPiece(wp);
                var piece = move.CreatePiece(move.MoveAN.PromovatedTo, color, move.TargetPosition);
                army.AlivePieces.Add(piece);
            }
        }