enum raw

enum GameStatus: Int {
 
  case initial = 0, playing, finished
}

var a = GameStatus.initial
a.rawValue // 0

var d = GameStatus(rawValue: 1)
d!.rawValue // 1

Tags: