Skip to content

Instantly share code, notes, and snippets.

@shunsugai
Last active March 11, 2016 14:59
Show Gist options
  • Save shunsugai/5c79e83af8e77d7c7ea8 to your computer and use it in GitHub Desktop.
Save shunsugai/5c79e83af8e77d7c7ea8 to your computer and use it in GitHub Desktop.
history = []
while history != [0, 0, 0, 0, 1] do
n = rand(2)
history.push(n)
history.shift if history.size > 5
puts n == 0 ? 'ズン' : 'ドコ'
end
puts 'キ・ヨ・シ!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment