LoginSignup
4
3

More than 5 years have passed since last update.

ズンドコキヨシワンライナー with Ruby

Last updated at Posted at 2016-03-14

ワンライナー

ズンドコキヨシ発動のため5個バッファする

Array.new(5).instance_eval { rotate! and puts self[-1] = [:ズン, :ドコ].sample until last == :ドコ and count(:ズン) == 4 and not puts :キヨシ }

実行例

   _╰╰,   /バショ % ~/tmp
  _/o ŏァ  / タイチョー% ヤバイ
∈ミ;ノ,ノ   \コマンド% ruby hikiyoshi.rb
ドコ
ズン
ズン
ドコ
ズン
ズン
ズン
ズン
ズン
ズン
ドコ
キヨシ

その他のキヨシ

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3