awkisopen/australium

View on GitHub
lib/australium/game_state.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Australium

  # Represents the state of the game at a particular time.
  class GameState < OpenStruct

    def initialize(*args)
      super(*args)

      # @!attribute players
      #   @return [Array<Player>] player data at this state
      self.players ||= []

      # @!attribute timestamp
      #   @return [DateTime]
    end

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

  end
end