Module: Api::AIBuild

Defined in:
lib/sc2ai/protocol/_meta_documentation.rb,
lib/sc2ai/protocol/sc2api_pb.rb

Overview

PROTOBUF VIRTUAL ENUM.

Constant Summary collapse

ENUM_AI_BUILD_UNSET =
0
RANDOM_BUILD =
1
RUSH =
2
TIMING =
3
POWER =
4
MACRO =
5
AIR =
6

Class Method Summary collapse

Class Method Details

.lookup(val) ⇒ Object



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 160

def self.lookup(val)
  if val == 0
    :ENUM_AI_BUILD_UNSET
  elsif val == 1
    :RANDOM_BUILD
  elsif val == 2
    :RUSH
  elsif val == 3
    :TIMING
  elsif val == 4
    :POWER
  elsif val == 5
    :MACRO
  elsif val == 6
    :AIR
  end
end

.resolve(val) ⇒ Object



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 178

def self.resolve(val)
  if val == :ENUM_AI_BUILD_UNSET
    0
  elsif val == :RANDOM_BUILD
    1
  elsif val == :RUSH
    2
  elsif val == :TIMING
    3
  elsif val == :POWER
    4
  elsif val == :MACRO
    5
  elsif val == :AIR
    6
  end
end