Module: Api::DebugEndGame::EndResult

Defined in:
lib/sc2ai/protocol/debug_pb.rb

Constant Summary collapse

ENUM_END_RESULT_UNSET =
0
SURRENDER =
1
DECLARE_VICTORY =
2

Class Method Summary collapse

Class Method Details

.lookup(val) ⇒ Object



10012
10013
10014
10015
10016
# File 'lib/sc2ai/protocol/debug_pb.rb', line 10012

def self.lookup(val)
  return :ENUM_END_RESULT_UNSET if val == 0
  return :SURRENDER if val == 1
  return :DECLARE_VICTORY if val == 2
end

.resolve(val) ⇒ Object



10018
10019
10020
10021
10022
# File 'lib/sc2ai/protocol/debug_pb.rb', line 10018

def self.resolve(val)
  return 0 if val == :ENUM_END_RESULT_UNSET
  return 1 if val == :SURRENDER
  return 2 if val == :DECLARE_VICTORY
end