1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-28 06:08:14 +00:00

fixed the trivial generation of Camelot in {even,x} tilings

This commit is contained in:
Zeno Rogue 2020-01-28 10:28:11 +01:00
parent 32a5368241
commit 970d0c4699

View File

@ -231,12 +231,16 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special
return NULL;
}
int flip = 0;
if(WDIM == 2 && S7 % 2 == 0) flip = hrand(2) ? 1 : -1;
// okay, let's go then!
cellwalker bf(c, gdir);
std::vector<cell *> cx(rad+1);
for(int i=0; i<rad; i++) {
cx[i] = bf.at;
bf += revstep;
if(flip && hrand(2) == 0) { bf += flip; flip *= -1; }
}
cx[rad] = bf.at;
heptagon *h = bf.at->master;