How do you make a matching game?


Is all my logic wrong? on how every button must get a random color and the number 1. Send help :((

So everytime the screen shows up the buttons will have random colors with number 1

If any two buttons get clicked and doesn't have the same color and number then the buttons that got clicked will be clickable again.
Else
If the two buttons have the same color&number the first button will become another random color with the number 1 and the second button will become 2 retaining its color.