Skip to content

Instantly share code, notes, and snippets.

@ryoppippi
Last active March 17, 2016 07:39
Show Gist options
  • Select an option

  • Save ryoppippi/35e73243fd406a805e5f to your computer and use it in GitHub Desktop.

Select an option

Save ryoppippi/35e73243fd406a805e5f to your computer and use it in GitHub Desktop.
Swift2でズンドコキヨシ ref: http://qiita.com/ryoppippi/items/437cbe7b1995584116aa
import UIKit
let array = ["ズン", "ドコ"]
var zun = 0
while true {
let a = Int(arc4random_uniform(2))
print(array[a])
if a == 0 {
zun += 1
}
else if a == 1 && zun == 4 {
break
}
else{
zun = 0
}
}
print("キ・ヨ・シ!!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment