1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

option -geo now accepts short names

This commit is contained in:
Zeno Rogue 2019-10-05 13:02:28 +02:00
parent 0e1b9c6720
commit 0b629c7bb2

View File

@ -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()));