Cocktail of questions!

I’m making an app for the user to shuffle cards and to chose cards that have images.

And I’m stuck.

Normally we ask one question at a time, I want to ask many questions and see if anybody can give me some answers. I’ll be happy with a brief explanation of what I can do in case it could
take you time to tell me step by step what to do, the rest I’ll try to figure it myself.

My questions are:

I’m using a repeating group of cards, and everything is working fine but what I’m trying to do now is to shuffle the images (create random order of the cards) everytime the shuffle button is clicked, I made a shuffle button. What would be the workflow for it? And what to put in data source? I have my cards in option sets and in data type.

Before I made two buttons on each side of the spread, the left button to scroll the cards to the left and the right button to scroll the cards to the right, somebody here told me the steps on how to do it and I was able to achieve it. I have already something written in data source but if I can’t have both the workflows of the 2 buttons and the workflow of the shuffle button, I’ll stay with the shuffle button and it’s workflow.

The second question is:

But first I’ll state my idea:

There are 2 rows of cards always in the repeating group, the shuffle button is on top.

The cards have to be shuffled everytime and selected/chosen by the user to complete the chosen spread.

What I want to do is this:

Once a card in the repeating group is selected (to chose a card/image) it cannot be selected again, only after the shuffle button is clicked again then all the cards become selectable again.-this is for ppl not to chose accidentally twice the same card.

Then once the person selects the type of spread they’ll want, for example: 3 cards, a row of 5 × 5 cards, etc.

A group will show up with a number of images depending on the chosen spread, and these images will display the images/cards that have been chosen on the spread/rows (of the repeating group).

First how would I be able to achieve that the cards or better say images in the data type or in option sets that have been chosen from the “repeating group” to complete the respective spread not to be shown in the repeating group again-maybe using a constrain?

And how can I make this happen before the respective chosen spread is completed (all the cards have been chosen?

So that once all the cards/images have been chosen to complete the spread then these images that were chosen and that were not showing up in the “repeating group” even if the user was shuffling the cards will then show up in the repeating group once again after the spread is completed.

Now at last the last question for this topic is,

I have a dropdown in the page also with the different spreads to chose from.

I want a group to show up once a type of spread is chosen.

I suppose this can be achieved having many groups for the different spreads that the user will chose from and with a show or toggle workflow a group or another will be shown.

And I think making a group relationship between the repeating group of cards and the group with the chosen type of spread and for the images within this last group to display the images that were chosen in the repeating group.

Any information or clarification on how to achieve this last step? What ever information you can give me I’ll be happy.

At last I’d like to know how to insert a template or more than one into my app, and combine them with my pages?

I have attached an image that shows how my page looks with everything I spoke about.

Thank you