War Card game + Blackjack

Hi guys!
I wanted to share my War Card game!
After finishing it i tought maybe to edit it for blackjack.
It is still not finished, but this is the code logic behind it:
4 random numbers, 2 for the player and 2 for the cpu
it checks if the score is over 21 or not ( Ace is 11, but when the score is over 21 ace will be reduced to 1)
It works now really fine but with only 2 cards for each player.

I put a label, for showing which player has won.
Today i want to edit the storyboard, that will show two cards of the player and above 2 cards of the cpu :slight_smile:Thank you chris! It makes so much fun now!
I hopefully will share the screenshots with you today in the evening! :smiley:

1 Like

Congrats! Looking forward to it!

It looks like this now but still not perfect
I need to refactor the code so it looks good for others and also be readable
I want to make the selection of the assets as an array, thats the next step :slight_smile:
Also have a small problem with autolayout on the iphone 11pro max while on the iphone 11 pro and other iphones there is no problem :slight_smile:

1 Like

Hey Gökhan
How did you set the value of queen, king etc to 10? and Ace to 11.
I’ve designed a whole deck of blackjack cards but I’m struggling really hard to put it into code.
How far is your Blackjack game now? :slight_smile: