Skip to content

Instantly share code, notes, and snippets.

@usualoma
Last active March 13, 2016 21:27
Show Gist options
  • Save usualoma/a9915dba764e8777b52c to your computer and use it in GitHub Desktop.
Save usualoma/a9915dba764e8777b52c to your computer and use it in GitHub Desktop.
#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