Class: Baron::Round

Inherits:
Object
  • Object
show all
Defined in:
lib/baron/round.rb,
lib/baron/round/stock_round.rb,
lib/baron/round/round_not_over.rb,
lib/baron/round/initial_auction.rb,
lib/baron/round/operating_round.rb

Overview

A round in the 18xx game such as a share round, or operating round

Direct Known Subclasses

InitialAuction, OperatingRound, StockRound

Defined Under Namespace

Classes: InitialAuction, OperatingRound, RoundNotOver, StockRound

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#gameBaron::Game (readonly)

The game which this initial auction is a part of

Examples:

round.game

Returns:


12
13
14
# File 'lib/baron/round.rb', line 12

def game
  @game
end

Instance Method Details

#endvoid

This method returns an undefined value.

End the round and execute anything special

This does nothing by default but can be overriden by subclasses.

Examples:

round.end

35
36
# File 'lib/baron/round.rb', line 35

def end
end

#over?Boolean

Is the current round over?

Examples:

round.over?

Returns:

  • (Boolean)

45
46
47
# File 'lib/baron/round.rb', line 45

def over?
  fail NotImplementedError
end

#startvoid

This method returns an undefined value.

Start the round and execute any special rules

This does nothing by default but can be overriden by subclasses.

Examples:

round.start

23
24
# File 'lib/baron/round.rb', line 23

def start
end