War card game ace value and adding sounds

Hi , I have completed the war card game and it works fine, I am trying to take it a bit further by adding different sounds depending on who wins and by how much, This will involve a different sound depending on the difference between the two cards.

Would it be better to use “if” statements or "switch " statements ?
I have imported AVFoundation but I am not sure where to place the play sound function. Globally or within another part of code.

The project I eventually wish to use these techniques is another card game app which I have manged to put the basics together using various tutorials but I don`t know how to give an Ace a variable value of 1 or 11 and how to get the app to know when to apply 1 or 11, for example in a game of Blackjack.

Thanks for any help given.
Joe

Whether you choose to allocate 1 or 11 to the Ace is a question of maths is it not? I mean if you got dealt a Jack, Queen or King then an Ace following would be given the value 11. Should you have been dealt cards to the value of less than or equal to 10 and an Ace followed then you might consider it as being 11 if the total value was close to the point at which you would decide to “sit” or got 21 as in a 5 card under.

I guess I would use “switch” to give you some flexibility but others may have a different view.

Hi Chris

yes i think your right , i have been over thinking it.
thanks

joe