i want to select 11 players randomly from different categories (wicketkeeper, batsman, allrounder, bowler) and ensure at least one player is chosen from each category and each country
You probably only want one wicket keeper?
Decide on how many you want selected from each category, the rest should be straightforward...
from each at least 1 and much as total items
and final should be 11 players from both the teams. and from both the teams at least 1 player from each team
You would therefore be happy with a team as follows:
5 wicket keepers
4 bowlers
1 batsman
1 allrounder
or
5 wicket keepers
1 bowler (who will bowl at the other end ?)
4 batsman
1 allrounder
?
i want any combination.
no problem. minimum 1 bowler needed.
I only ask, because, from the MCC rules:
17.6 Bowler changing ends
A bowler shall be allowed to change ends as often as desired,
provided he/she does not bowl two overs consecutively,
nor bowl parts of each of two consecutive overs, in the same innings.
i just want to make a team of 11 players from the 22 players randomly from each catagories at least 1 player is there.
It is more complicated than your example blocks, assuming you can only select a player in a category once. You will need to run temporary lists for each category that remove the selected player each time, to avoid duplication.
Also, it is likely that we will start using AI2 list blocks that are not available in Kodular! You might want to ask on the Kodular community instead, there are I am sure, plenty of cricket fans there, who may already have done this. (I say this because it is obvious you are developing in Kodular)
i m using Android Builder. Developed by an Indian.
Then you may likely have the same problem. Not prepared to work up a solution if you cannot take it away to "Android Builder".