Sha256: cc3a32d0a500b5a092604622f1ff23d4612e3ad1865e0cb7a80657b506efc85b
Contents?: true
Size: 610 Bytes
Versions: 1
Compression:
Stored size: 610 Bytes
Contents
require "sc2ai" class <%= @classname %> < Sc2::Player::Bot def configure @realtime = false # Step-mode vs Bot, Realtime vs Humans @step_count = 2 # 2s/22.4 = ~89.29ms step cycle time allowance @enable_feature_layer = false # Enables ui_ and spatial_ actions. Advanced, and has performance cost. end def on_step if game_loop == 0 units.workers.attack(target: geo.enemy_start_position) end # If your attack fails, "good game" and exit if units.workers.size.zero? action_chat("gg", channel: Api::ActionChat::Channel::BROADCAST) leave_game end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sc2ai-0.3.0 | lib/templates/new/my_bot.rb.tt |