mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			534 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			534 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
| enum Rank: Int {
 | |
|     case Ace = 1
 | |
|     case Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten
 | |
|     case Jack, Queen, King
 | |
|     func simpleDescription() -> String {
 | |
|         switch self {
 | |
|             case .Ace:
 | |
|                 return "ace"
 | |
|             case .Jack:
 | |
|                 return "jack"
 | |
|             case .Queen:
 | |
|                 return "queen"
 | |
|             case .King:
 | |
|                 return "king"
 | |
|             default:
 | |
|                 return String(self.toRaw())
 | |
|         }
 | |
|     }
 | |
| }
 | |
| let ace = Rank.Ace
 | |
| let aceRawValue = ace.toRaw()
 |