예제 #1
0
    Piece ClonePieceAndPromote(Piece piece, Piece.Type promotion)
    {
        Piece clone = new Piece();

        clone = DeclarePiece(promotion, 0, 0);
        clone.movedColor = piece.movedColor;
        clone.playerColor = piece.playerColor;
        clone.player = piece.player;

        clone.MoveGameObject(piece.position);

        piece.CapturePiece();

        return clone;
    }