How To Simulate Drawing Cards! Berkian Style! Difficulty 5/10 or šŸŸØ

But it produces the same outcome as the elseā€¦

Iā€™m so very confused of why it produces the same outcome as the else and itā€™s still required.

1 Like

Okay, let me try again. The if part of the statement checks to see if the drawn card is not equal to Claimed. Like for example, a card whoā€™s value is ā€˜Baghdadā€™, itā€™s not Claimed so itā€™s set to Claimed. Now, as far as I can tell, youā€™re saying that the else/if is unnecessary because the else already runs the same thing. But without the else/if, a card set to ā€˜Discardedā€™ would fit the description of not equal to Claimed, and that would ruin the simulation of not picking up the card again. The else just checks if the card is equal to ā€˜Claimedā€™. Better?

1 Like

But doesnā€™t it already? So it would always run that code first, and never run the others if itā€™s equal to ā€œdiscardedā€?

1 Like

Yeah, I realized that to, but it still doesnā€™t effect it somehowā€¦
like as if the game also for fun looks through the rest of the code and sees the discard else/if statement, but I dunno, itā€™s weird.

1 Like

Does the whole code work?

1 Like

Yeah it does.
No glitches or anything.

(you might not have seen it but I just added dealing and Reshuffling the discarded cards)

1 Like

Ok then Iā€™m loosing my mind over nothing. Ima just not ask questions anymore

1 Like

Oh then that makes sense now

Okay. :laughing:

1 Like