mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
10 lines
300 B
Swift
10 lines
300 B
Swift
struct Card {
|
|
var rank: Rank
|
|
var suit: Suit
|
|
func simpleDescription() -> String {
|
|
return "The \(rank.simpleDescription()) of \(suit.simpleDescription())"
|
|
}
|
|
}
|
|
let threeOfSpades = Card(rank: .Three, suit: .Spades)
|
|
let threeOfSpadesDescription = threeOfSpades.simpleDescription()
|