Last active
March 13, 2016 21:27
-
-
Save usualoma/a9915dba764e8777b52c 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
#coding:utf-8 | |
import random | |
def zundoko_generator(): | |
while True: | |
yield random.choice(['ズン','ドコ']) | |
def zundoko_kiyoshi(generator): | |
c = 0 | |
while True: | |
zd = generator.next() | |
print zd | |
if zd == 'ズン': | |
c += 1 | |
elif zd == 'ドコ': | |
if c >= 4: | |
break | |
else: | |
c = 0 | |
print 'キ・ヨ・シ!' | |
zundoko_kiyoshi(zundoko_generator()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment