Module: BattleRoyal::Roll
- Defined in:
- lib/battle_royal/roll.rb
Class Method Summary collapse
Class Method Details
.actions ⇒ Object
3 4 5 |
# File 'lib/battle_royal/roll.rb', line 3 def self.actions [:power_up, :damage, nil] end |
.turn(player) ⇒ Object
7 8 9 10 |
# File 'lib/battle_royal/roll.rb', line 7 def self.turn(player) action = actions.sample !action.nil? ? player.send(action) : puts("\n#{player.name} missed a turn") end |
.weapon(_player) ⇒ Object
12 13 14 |
# File 'lib/battle_royal/roll.rb', line 12 def self.weapon(_player) WeaponChest.random end |