Hi!
Yes, that’s the logic. However, there’s no need to do anything for 7, 8 and 9, since there is no real change.
Now, in regards to Your code, that’s not quite right. I mean, if (card == 2, 3, 4, 5, 6) will not work (maybe it’s pseudo code, in which case would be ok).
I can think of 3 ways to solve this:
- With an array,
- With a switch…case or
- With an if…else
Hope it helps ![]()