Helo koders i need help in some block ,
i have 17 buttons in a screen , 17’th button is a reset button. when reset (17’th) button click color of other 16 buttons want to change randomly , these color is selected from 16 color list.
my problem is each button need unique color at a time , don’t repeat a color for buttons.
Maybe create a list with the colors. Before assigning them to the button, check if it already exists in that list, if not, assign the color to the button and store it in the list. If it already exists, create a new color randomly.
Blocks ? I didn’t use blocks … I used algorithm … I didn’t test…
Create a list
Each color created randomly, you check if it already exists in the list
If it already exists create another color randomly If not, insert it in the list and associate it with the component
So my friend… You create a color with the numbers, don’t you? That color is created … correct?
Red Green Blue , 3 numbers
1 random number for each Red Green and Blue. If that combination that already exists in the list you created, don’t use it. Make create 3 new random numbers …