Skip to content

Instantly share code, notes, and snippets.

@hanabokuro
Created June 3, 2014 07:04
Show Gist options
  • Save hanabokuro/029a658c5efdf3ac2cd3 to your computer and use it in GitHub Desktop.
Save hanabokuro/029a658c5efdf3ac2cd3 to your computer and use it in GitHub Desktop.
Bon Jovis Generator
#! /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