Bored? Craving a pub quiz fix? Why, just come to the Royal Oak! Jack quietly moved up front and seized the big ball of wax. Bored? Craving a pub quiz fix? Why, just come to the Royal Oak! Jack quietly moved up front and seized the big ball of wax.
「ぼくゴリラ ウホホイウッホ ウホホホホ ウッホホウッホ ウホホホホーイ」 第57回左千夫短歌大会の市長賞作品に感動が抑えきれないので、ウホホ変換スクリプトを組むことにした。 まず元作品から状態遷移図を作成。矢印のそばにある数字は遷移確率。 そのままコードに落とす。 class Array def any; self[rand(self.size)] end end module Uho MASTERPIECE = 'ウホホイウッホ ウホホホホ ウッホホウッホ ウホホホホーイ' DEFAULT_CHAR = 'ウ' class Converter def initialize(masterpiece=MASTERPIECE) @char_table = {} masterpiece.split(' ').each do |sentence| chars = sentence.split('
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く