How would you convert this Objective-C
if ((loc = [player locateCardValue:8]) > -1) {
to Swift 3?
[player locateCardValue]
returns an integer of the location where the card '8'
was found. Returning -1
means it didn't find the card '8'
.
I could use ...
let loc = player.locateCard(withValue: 8)
if loc > -1 {
but I have multiple nesting of IF's and it would get really messy.
if
…