Post

Replies

Boosts

Views

Activity

Comment on How to write a method to sort out black and red cards Newbie to Swift
`var Array = [ "Ace:1","Two:2","Three:3 ","Four:4","Five:5 ","Six:6","Seven:7","Eight:8","Nine:9","Ten:10", "Jack:11","Queen:12","King:13"] let cardType = ["Spades","Hearts","Diamonds","Clubs"] for cardType in cardType { for Array in Array { print("(Array) of (cardType) ") //??? Card(rank: .Three,suit:.Spades) } print("-----------------") }
Jan ’23
Comment on How to write a method to sort out black and red cards Newbie to Swift
`var Array = [ "Ace:1","Two:2","Three:3 ","Four:4","Five:5 ","Six:6","Seven:7","Eight:8","Nine:9","Ten:10", "Jack:11","Queen:12","King:13"] let cardType = ["Spades","Hearts","Diamonds","Clubs"] for cardType in cardType { for Array in Array { print("(Array) of (cardType) ") //??? Card(rank: .Three,suit:.Spades) } print("-----------------") }
Replies
Boosts
Views
Activity
Jan ’23