Danny

Danny

  • NA
  • 5
  • 5.9k

How to randomly assign a bunch of buttons a number and color

Feb 4 2013 2:07 PM
So I have this grid containing 5x5 buttons where I want to randomly generate one number(1-5) to each button, and randomly place one (of 5) color to each button.


Ex


[RED 1][BLUE 5][GREEN 2][RED 4][YELLOW 3]
[GREEN 1][YELLOW 5][Orange 3] and so on.....


Ok, so the question is, in which steps should I think? And are there some good methods to use in this case? I'm starting from scratch....


I appreciate any help!

----
EDIT
So there will only exist five buttons of one color, and to each color there are numbered 1-5.