Last active
March 17, 2016 07:39
-
-
Save ryoppippi/35e73243fd406a805e5f to your computer and use it in GitHub Desktop.
Swift2でズンドコキヨシ ref: http://qiita.com/ryoppippi/items/437cbe7b1995584116aa
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 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