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