Module: Api::ResponseCreateGame::Error

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

Constant Summary collapse

ENUM_RESPONSE_CREATE_GAME_ERROR_UNSET =
0
MISSING_MAP =
1
INVALID_MAP_PATH =
2
INVALID_MAP_DATA =
3
INVALID_MAP_NAME =
4
INVALID_MAP_HANDLE =
5
MISSING_PLAYER_SETUP =
6
INVALID_PLAYER_SETUP =
7
MULTIPLAYER_UNSUPPORTED =
8

Class Method Summary collapse

Class Method Details

.lookup(val) ⇒ Object



11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 11061

def self.lookup(val)
  if val == 0
    :ENUM_RESPONSE_CREATE_GAME_ERROR_UNSET
  elsif val == 1
    :MISSING_MAP
  elsif val == 2
    :INVALID_MAP_PATH
  elsif val == 3
    :INVALID_MAP_DATA
  elsif val == 4
    :INVALID_MAP_NAME
  elsif val == 5
    :INVALID_MAP_HANDLE
  elsif val == 6
    :MISSING_PLAYER_SETUP
  elsif val == 7
    :INVALID_PLAYER_SETUP
  elsif val == 8
    :MULTIPLAYER_UNSUPPORTED
  end
end

.resolve(val) ⇒ Object



11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 11083

def self.resolve(val)
  if val == :ENUM_RESPONSE_CREATE_GAME_ERROR_UNSET
    0
  elsif val == :MISSING_MAP
    1
  elsif val == :INVALID_MAP_PATH
    2
  elsif val == :INVALID_MAP_DATA
    3
  elsif val == :INVALID_MAP_NAME
    4
  elsif val == :INVALID_MAP_HANDLE
    5
  elsif val == :MISSING_PLAYER_SETUP
    6
  elsif val == :INVALID_PLAYER_SETUP
    7
  elsif val == :MULTIPLAYER_UNSUPPORTED
    8
  end
end