Module: Api::Difficulty
- Defined in:
- lib/sc2ai/protocol/_meta_documentation.rb,
lib/sc2ai/protocol/sc2api_pb.rb
Overview
PROTOBUF VIRTUAL ENUM.
Constant Summary collapse
- ENUM_DIFFICULTY_UNSET =
0
- VERY_EASY =
1
- EASY =
2
- MEDIUM =
3
- MEDIUM_HARD =
4
- HARD =
5
- HARDER =
6
- VERY_HARD =
7
- CHEAT_VISION =
8
- CHEAT_MONEY =
9
- CHEAT_INSANE =
10
Class Method Summary collapse
Class Method Details
.lookup(val) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 69 def self.lookup(val) if val == 0 :ENUM_DIFFICULTY_UNSET elsif val == 1 :VERY_EASY elsif val == 2 :EASY elsif val == 3 :MEDIUM elsif val == 4 :MEDIUM_HARD elsif val == 5 :HARD elsif val == 6 :HARDER elsif val == 7 :VERY_HARD elsif val == 8 :CHEAT_VISION elsif val == 9 :CHEAT_MONEY elsif val == 10 :CHEAT_INSANE end end |
.resolve(val) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/sc2ai/protocol/sc2api_pb.rb', line 95 def self.resolve(val) if val == :ENUM_DIFFICULTY_UNSET 0 elsif val == :VERY_EASY 1 elsif val == :EASY 2 elsif val == :MEDIUM 3 elsif val == :MEDIUM_HARD 4 elsif val == :HARD 5 elsif val == :HARDER 6 elsif val == :VERY_HARD 7 elsif val == :CHEAT_VISION 8 elsif val == :CHEAT_MONEY 9 elsif val == :CHEAT_INSANE 10 end end |