Module: AAMaker

Defined in:
lib/plugins/aa.rb

Class Method Summary collapse

Class Method Details

.makeObject


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/plugins/aa.rb', line 12

def self.make
  rinkaku = randSelect([['(', ')'], ['(', ')'], ['|', '|'], ['', '']]);
  otete = randSelect([['', '', '', '', ''], ['', '', 'm', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', ' ', '', '', 'o彡゚'], ['', 'n', '', '', 'η'], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['', '', '', '', ''], ['<', '', '', '', '/'], ['', '', '', ' ', ''], ['o', '', '', '', 'o'], ['o', '', '', '', ''], ['', '', '', '', 'ノシ']]);
  omeme = randSelect([['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['´・', '・`'], ['`・', '・´'], ['´', '`'], ['', ''], ['', ''], ['\'', '\''], ['・ิ', '・ิ'], ['', ''], ['', ''], ['', ''], ['◕ˇ', 'ˇ◕']]);
  okuti = randSelect(['ω', '', '', '', 'Д' , '', '', '', '', 'ρ', 'o']);
  hoppe = randSelect([['', ''], ['*', ''], ['', '*'], ['', '#'], ['#', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', ''], ['', '']]);

  text = [
    otete[0],
    rinkaku[0],
    otete[1] || (otete[3] ? '' : hoppe[0]),
    omeme[0],
    otete[2] || okuti,
    omeme[1],
    otete[3] || (otete[1] ? '' : hoppe[1]),
    rinkaku[1],
    otete[4]
  ].join('')

  text
end

.random(n) ⇒ Object


5
6
7
# File 'lib/plugins/aa.rb', line 5

def self.random(n)
  rand(n).to_i
end

.randSelect(array) ⇒ Object


8
9
10
# File 'lib/plugins/aa.rb', line 8

def self.randSelect(array)
  return array[random(array.length)]
end