Module: Api::Status
- Defined in:
- lib/sc2ai/protocol/sc2api_pb.rb
Constant Summary collapse
- ENUM_STATUS_UNSET =
0
- LAUNCHED =
1
- INIT_GAME =
2
- IN_GAME =
3
- IN_REPLAY =
4
- ENDED =
5
- QUIT =
6
- UNKNOWN =
99
Class Method Summary collapse
Class Method Details
.lookup(val) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 16 def self.lookup(val) if val == 0 :ENUM_STATUS_UNSET elsif val == 1 :LAUNCHED elsif val == 2 :INIT_GAME elsif val == 3 :IN_GAME elsif val == 4 :IN_REPLAY elsif val == 5 :ENDED elsif val == 6 :QUIT elsif val == 99 :UNKNOWN end end |
.resolve(val) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 36 def self.resolve(val) if val == :ENUM_STATUS_UNSET 0 elsif val == :LAUNCHED 1 elsif val == :INIT_GAME 2 elsif val == :IN_GAME 3 elsif val == :IN_REPLAY 4 elsif val == :ENDED 5 elsif val == :QUIT 6 elsif val == :UNKNOWN 99 end end |