mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-31 22:12:59 +00:00
option -geo now accepts short names
This commit is contained in:
@@ -921,6 +921,7 @@ EX void runGeometryExperiments() {
|
|||||||
#if CAP_COMMANDLINE
|
#if CAP_COMMANDLINE
|
||||||
|
|
||||||
eGeometry readGeo(const string& ss) {
|
eGeometry readGeo(const string& ss) {
|
||||||
|
for(int i=0; i<isize(ginf); i++) if(ginf[i].shortname == ss) return eGeometry(i);
|
||||||
bool numeric = true;
|
bool numeric = true;
|
||||||
for(char c: ss) if(c < '0' || c > '9') numeric = false;
|
for(char c: ss) if(c < '0' || c > '9') numeric = false;
|
||||||
if(numeric) return eGeometry(atoi(ss.c_str()));
|
if(numeric) return eGeometry(atoi(ss.c_str()));
|
||||||
|
|||||||
Reference in New Issue
Block a user