- Defined in:
GameRoundFlow manages the flow of rounds that occur throughout the game, deciding if there is a stock round, or operating round next as an example.
Instance Method Summary collapse
#current_round ⇒ Baron::Round
The current round in the game.
#initialize(game) ⇒ GameRoundFlow
Initialize the game round flow.
Initialize the game round flow
13 14 15 16
# File 'lib/baron/game_round_flow.rb', line 13 def initialize(game) @upcoming_rounds =  @game = game end
Instance Method Details
The current round in the game
This will return a stock round, operating round, auction round or some other round.
28 29 30 31 32 33 34 35
# File 'lib/baron/game_round_flow.rb', line 28 def current_round @current_round ||= ::.(@game) if @current_round.over? @current_round = next_round @current_round.start if @current_round end @current_round end