Class: Australium::GameState
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Australium::GameState
- Defined in:
- lib/australium/game_state.rb
Overview
Represents the state of the game at a particular time.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ GameState
constructor
A new instance of GameState.
- #inspect ⇒ Object
Constructor Details
#initialize(*args) ⇒ GameState
Returns a new instance of GameState.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/australium/game_state.rb', line 6 def initialize(*args) super(*args) # @!attribute players # @return [Array<Player>] player data at this state self.players ||= [] # @!attribute timestamp # @return [DateTime] end |
Instance Attribute Details
#timestamp ⇒ DateTime
|
# File 'lib/australium/game_state.rb', line 13
|
Instance Method Details
#inspect ⇒ Object
17 |
# File 'lib/australium/game_state.rb', line 17 def inspect; "<GameState:#{}>" end |