Class: Sc2::Player::Observer

Inherits:
Sc2::Player show all
Defined in:
lib/sc2ai/player.rb

Overview

A spectator for a Match

Constant Summary

Constants inherited from Sc2::Player

IDENTIFIED_RACES

Instance Attribute Summary

Attributes inherited from Sc2::Player

#IDENTIFIED_RACES, #ai_build, #api, #difficulty, #enable_feature_layer, #interface_options, #name, #opponent_id, #race, #realtime, #step_count, #type

Attributes included from GameState

#chats_received, #data, #game_info, #game_info_loop, #game_loop, #observation, #result, #spent_minerals, #spent_supply, #spent_vespene, #status

Instance Method Summary collapse

Methods inherited from Sc2::Player

#connect, #create_game, #disconnect, #join_game, #leave_game, #race_unknown?, #refresh_game_info, #requires_client?

Methods included from GameState

#available_abilities, #common, #on_status_change

Methods included from Connection::StatusListener

#on_status_change

Constructor Details

#initialize(name: nil) ⇒ Observer

Returns a new instance of Observer.



494
495
496
# File 'lib/sc2ai/player.rb', line 494

def initialize(name: nil)
  super(race: Api::Race::NO_RACE, name:, type: Api::PlayerType::OBSERVER)
end