Module: Sc2
- Defined in:
- lib/sc2ai.rb,
lib/sc2ai/paths.rb,
lib/sc2ai/ports.rb,
lib/sc2ai/player.rb,
lib/sc2ai/cli/cli.rb,
lib/sc2ai/cli/new.rb,
lib/sc2ai/version.rb,
lib/sc2ai/api/data.rb,
lib/sc2ai/connection.rb,
lib/sc2ai/player/geo.rb,
lib/sc2ai/unit_group.rb,
lib/sc2ai/player/debug.rb,
lib/sc2ai/player/units.rb,
lib/sc2ai/cli/ladderzip.rb,
lib/sc2ai/configuration.rb,
lib/sc2ai/player/actions.rb,
lib/sc2ai/local_play/match.rb,
lib/sc2ai/local_play/client.rb,
lib/sc2ai/player/game_state.rb,
lib/sc2ai/unit_group/geo_ext.rb,
lib/sc2ai/connection/requests.rb,
lib/sc2ai/local_play/map_file.rb,
lib/sc2ai/player/previous_state.rb,
lib/sc2ai/unit_group/action_ext.rb,
lib/sc2ai/unit_group/filter_ext.rb,
lib/sc2ai/local_play/client_manager.rb,
lib/sc2ai/connection/status_listener.rb,
lib/sc2ai/protocol/extensions/position.rb,
lib/sc2ai/connection/connection_listener.rb,
lib/sc2ai/local_play/client/configurable_options.rb
Overview
Facilitates StarCraft 2 AI
Defined Under Namespace
Modules: Position Classes: Cli, Client, ClientManager, Configuration, Connection, Data, Error, MapFile, Match, Paths, Player, PortConfig, Ports, UnitGroup
Constant Summary collapse
- VERSION =
gem version
"0.2.0"
Class Attribute Summary collapse
-
.config {|@config| ... } ⇒ Object
Instantiate the Configuration singleton or return it.
-
.logger ⇒ Logger
A logger instance or a new $stdout logger if undefined.
Class Method Summary collapse
-
.ladder? ⇒ Boolean
Returns whether we are on the ladder or not.
Class Attribute Details
.config {|@config| ... } ⇒ Object
Instantiate the Configuration singleton or return it. Remember that the instance has attribute readers so that we can access the configured values
64 65 66 67 68 |
# File 'lib/sc2ai.rb', line 64 def config @config ||= Configuration.new yield @config if block_given? @config end |
.logger ⇒ Logger
Returns a logger instance or a new $stdout logger if undefined.
77 78 79 80 81 82 83 84 85 |
# File 'lib/sc2ai.rb', line 77 def logger return @logger if @logger require "logger" @logger = Logger.new($stdout) @logger.level = :debug @logger end |
Class Method Details
.ladder? ⇒ Boolean
Returns whether we are on the ladder or not
89 90 91 |
# File 'lib/sc2ai.rb', line 89 def ladder? @is_live ||= ENV.has_key?("AIARENA") end |