Class: Hlockey::Game::Weather::Audacity

Inherits:
Object
  • Object
show all
Includes:
Actions, Weatherable
Defined in:
lib/hlockey/game/weather/audacity.rb

Overview

Audacity weather Causes players to take shots regardless of the state of the game

Instance Method Summary collapse

Methods included from Weatherable

#initialize, #on_game_end, #on_game_start, #on_goal, #on_period_end

Methods included from SelfDescribable

#to_s

Instance Method Details

#on_actionObject



14
15
16
# File 'lib/hlockey/game/weather/audacity.rb', line 14

def on_action
  @game.send(:shoot, audacity: true) if random_event_occurs?(10)
end