Skip to content

Instantly share code, notes, and snippets.

@sasamijp
Created September 29, 2014 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasamijp/ad2d4f481934a74563e5 to your computer and use it in GitHub Desktop.
Save sasamijp/ad2d4f481934a74563e5 to your computer and use it in GitHub Desktop.
おちんぽ無限回廊
# encoding: utf-8
array = ["ち","ん","ぽ"]
c = 1
narray = []
1000.times do
narray.push array.sample
end
narray.each_with_index do |v,l|
print v
system("say #{v}")
break if [v, narray[l-1],narray[l-2]].join('') == array.reverse.join('')
c += 1
end
puts "#{c}回目でイきました"
system("say #{c}回目でイきました")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment