Hello folks, let´s see if someone can give me some light with a doubt…
I have four cards: paper, rock, scissors and atomic bomb…
I placed all in a list and I´m picking up the objects randomically when the user clicks a button…
All is working perfect.
Now my doubt is… in case i want to place a text above the card with the object name, ie:(Rock or paper or scissors or atomic bomb) how to proceed?
I know the “piggy” solution for that would be to verify through “if then else” conditional, the number of the index in the cards list and return a string with the name. It can works really well for 4 cards, but it will be terrible if i have a deck with about 40 cards and their names.
How to join the random card and display it name on screen in case i have a big deck of cards?
Thanks!