Created
June 3, 2014 07:04
-
-
Save hanabokuro/029a658c5efdf3ac2cd3 to your computer and use it in GitHub Desktop.
Bon Jovis Generator
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
#! /usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
words = %w(ボ ン ジョ ヴィ) | |
targets = %w(ジョ ン ボ ン ジョ ヴィ) | |
recent = [] | |
num_generate = 0 | |
begin | |
num_generate += 1 | |
word = words.sample | |
print word, " " | |
recent.push(word) | |
recent.shift while targets.length < recent.length | |
end until(targets == recent) | |
print "\n" | |
print <<EOS | |
#{num_generate} Bon Jovis | |
_人人人人人人人人人人人人人人_ | |
> You Give Love A Bad Name < | |
 ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄ | |
EOS | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment