Created
August 25, 2015 06:57
-
-
Save toshi0383/bbd6e78e1394fe861597 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Darwin | |
| enum Member: Int { | |
| case Nakagawa, Otani, Mattsu, Toshi, Minami | |
| case Unknown | |
| static let count:Int = 5 | |
| static func getSomeone() -> Member { | |
| let r = Int(arc4random_uniform(10000)) | |
| let i = r % Member.count | |
| return Member(rawValue: i) ?? Member.Unknown | |
| } | |
| } | |
| print(Member.getSomeone()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment