I am creating a blackjack game for the kids. I am trying to add instance variables of the cards to a text. Two things I am noticing are not adding up to me.
1. The variable for a card is always read as the number 10 rather than what is in the variable
2. I cannot get a for loop to work, or a condition for adding for each variable only once to the text
1) Interestingly, my highest variable for any number is 10 (11 for aces) just as the game should be. So I am wondering if it has something to do with that but I start all cards off with the same frame, then update them as random cards that cover all 52 cards for each deck (just like a shuffle).
The text I am debugging (and any text really), always shows 10 as the value, even if say....the card is a 4 with the instance variable of 4.
2) This I can figure out somehow if not answered but...I cannot get the cards, if more than one that is causing the "trigger", to only add once per card to the total(text). I can get 1 card to add to it once and others not register, or I can get more than 1 card to keep adding and not stop.
I am linking a video to it explaining it all. Apologies if the video is long and/or partially meaningful. I tried to make it the best I could and got confused during also.