Class: BCDice::CommonCommand::BarabaraDice::Result

Inherits:
Result
  • Object
show all
Defined in:
lib/bcdice/common_command/barabara_dice/result.rb

Overview

バラバラロールの結果を表すクラス

Instance Attribute Summary collapse

Attributes inherited from Result

#critical, #detailed_rands, #failure, #fumble, #rands, #secret, #success, #text

Instance Method Summary collapse

Methods inherited from Result

#condition=, critical, #critical?, failure, #failure?, fumble, #fumble?, nothing, #secret?, success, #success?

Constructor Details

#initialize(text = nil) ⇒ Result

Returns a new instance of Result.

Parameters:

  • text (String, nil) (defaults to: nil)

    結果の文章



18
19
20
21
22
23
24
# File 'lib/bcdice/common_command/barabara_dice/result.rb', line 18

def initialize(text = nil)
  super(text)

  @last_dice_list_list = []
  @last_dice_list = []
  @success_num = 0
end

Instance Attribute Details

#last_dice_listArray<Integer>

Returns すべての出目が格納される配列.

Returns:

  • (Array<Integer>)

    すべての出目が格納される配列



13
14
15
# File 'lib/bcdice/common_command/barabara_dice/result.rb', line 13

def last_dice_list
  @last_dice_list
end

#last_dice_list_listArray<Array<Integer>>

Returns 出目のグループの配列.

Returns:

  • (Array<Array<Integer>>)

    出目のグループの配列



11
12
13
# File 'lib/bcdice/common_command/barabara_dice/result.rb', line 11

def last_dice_list_list
  @last_dice_list_list
end

#success_numInteger

Returns 成功数.

Returns:

  • (Integer)

    成功数



15
16
17
# File 'lib/bcdice/common_command/barabara_dice/result.rb', line 15

def success_num
  @success_num
end