MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / condFromString

Function condFromString

plugins/mapchange/mapchange.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68MapChangeEventHandler handler;
69
70EndCond condFromString(const std::string& str) {
71 if (compare_nocase(str, "timed") == 0) {
72 return eTimedGame;
73 }
74 else if (compare_nocase(str, "maxkill") == 0) {
75 return eMaxKillScore;
76 }
77 else if (compare_nocase(str, "maxcap") == 0) {
78 return eMaxCapScore;
79 }
80 else if (compare_nocase(str, "empty") == 0) {
81 return eNoPlayers;
82 }
83 else if (compare_nocase(str, "manual") == 0) {
84 return eManual;
85 }
86
87 return eTimedGame;
88}
89
90const char* condToString(EndCond cond) {
91 if (cond == eTimedGame) {

Callers 2

loadGamesFromFileFunction · 0.85
handleMethod · 0.85

Calls 1

compare_nocaseFunction · 0.50

Tested by

no test coverage detected