mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-05 08:44:07 +00:00
fixed the trivial generation of Camelot in {even,x} tilings
This commit is contained in:
parent
32a5368241
commit
970d0c4699
@ -231,12 +231,16 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int flip = 0;
|
||||||
|
if(WDIM == 2 && S7 % 2 == 0) flip = hrand(2) ? 1 : -1;
|
||||||
|
|
||||||
// okay, let's go then!
|
// okay, let's go then!
|
||||||
cellwalker bf(c, gdir);
|
cellwalker bf(c, gdir);
|
||||||
std::vector<cell *> cx(rad+1);
|
std::vector<cell *> cx(rad+1);
|
||||||
for(int i=0; i<rad; i++) {
|
for(int i=0; i<rad; i++) {
|
||||||
cx[i] = bf.at;
|
cx[i] = bf.at;
|
||||||
bf += revstep;
|
bf += revstep;
|
||||||
|
if(flip && hrand(2) == 0) { bf += flip; flip *= -1; }
|
||||||
}
|
}
|
||||||
cx[rad] = bf.at;
|
cx[rad] = bf.at;
|
||||||
heptagon *h = bf.at->master;
|
heptagon *h = bf.at->master;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user