Class: Australium::GameState

Inherits:
OpenStruct
  • Object
show all
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

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

#timestampDateTime

Returns:

  • (DateTime)


# File 'lib/australium/game_state.rb', line 13

Instance Method Details

#inspectObject



17
# File 'lib/australium/game_state.rb', line 17

def inspect; "<GameState:#{timestamp}>" end