Skip to content

Instantly share code, notes, and snippets.

@solum13
Created December 7, 2014 02:01
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 solum13/5a9cb13100987f3b0c75 to your computer and use it in GitHub Desktop.
Save solum13/5a9cb13100987f3b0c75 to your computer and use it in GitHub Desktop.
# coding: utf-8
words = %w(ボ ン ジョ ヴィ ・)
expected_sequence = [2, 1, 4, 0, 1, 4, 2, 3]
state = 0
count = 0
while expected = expected_sequence[state]
actual = Random::rand(words.size)
state = (actual == expected) ? state+1 : 0
print words[actual], ' '
count += 1
end
print <<END
#{count} Bon Jovis
_人人人人人人人人人人人人人人_
> You Give Love A Bad Name <
 ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment