Skip to content

Commit

Permalink
DiceRoll: ダイス多すぎメッセージの定数名を変更した
Browse files Browse the repository at this point in the history
fixed #37
  • Loading branch information
ochaochaocha3 committed Mar 19, 2015
1 parent 3c4ec9b commit 251b148
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rgrb/plugin/dice_roll/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module Plugin
module DiceRoll
# DiceRoll の出力テキスト生成器
class Generator
TOO_MANY_DICES = "ダイスが机から落ちてしまいましたの☆"
EXCESS_DICE_MESSAGE = "ダイスが机から落ちてしまいましたの☆"

def initialize
@random = Random.new
end
Expand All @@ -22,7 +22,7 @@ def initialize
# @return [String]
def basic_dice(rolls, sides)
if rolls > 100
"#{rolls}d#{sides}: #{TOO_MANY_DICES}"
"#{rolls}d#{sides}: #{EXCESS_DICE_MESSAGE}"
else
dice_roll(rolls, sides).dice_roll_format
end
Expand All @@ -33,7 +33,7 @@ def basic_dice(rolls, sides)
# @return [String]
def dxx_dice(rolls)
if rolls.size > 20
"d#{rolls}: #{TOO_MANY_DICES}"
"d#{rolls}: #{EXCESS_DICE_MESSAGE}"
else
values = dxx_roll(rolls)
"d#{rolls} = [#{values.join(',')}] = #{values.join('')}"
Expand Down

0 comments on commit 251b148

Please sign in to comment.