1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 16:37:40 +00:00

more elegant cellwalkers

This commit is contained in:
Zeno Rogue
2018-03-24 12:59:01 +01:00
parent 2c09c5ee56
commit ac37b6df99
20 changed files with 371 additions and 467 deletions

View File

@@ -189,17 +189,17 @@ namespace yendor {
in_endorian = false;
nyi.path[i] = lig.c;
cwstep(lig);
lig += wstep;
if(inmirror(lig)) lig = mirror::reflect(lig);
cwspin(lig, 3);
lig += 3;
if(lig.c->type == 7) {
if(in_endorian && endorian_change && i >= YDIST - 20) {
// make the last leg a bit more difficult
cwspin(lig, hrand(2)*3-1);
lig += (hrand(2)*3-1);
endorian_change = false;
}
else
cwspin(lig, hrand(2));
lig += hrand(2);
}
}
nyi.path[YDIST-1] = lig.c;