1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-05 03:47:58 +00:00

mixed infinite order

This commit is contained in:
Zeno Rogue
2020-01-19 00:13:54 +01:00
parent 4fd196c6d8
commit 24b3d17eb4
6 changed files with 79 additions and 13 deletions

View File

@@ -13,10 +13,18 @@ namespace hr {
EX namespace inforder {
EX bool in() { return S3 >= OINF; }
EX bool mixed() { return cgflags & qINFMIXED; }
EX int alt_degree;
struct hrmap_inforder : hrmap_hyperbolic {
heptagon *create_step(heptagon *h, int direction) {
auto h1 = tailored_alloc<heptagon> (S7);
int deg = h->type;
if(mixed()) deg = 7 - deg;
auto h1 = tailored_alloc<heptagon> (deg);
bool par = h->s == hsA && direction == 0;
h->c.connect(direction, h1, par ? 1 + hrand(2) : 0, false);
@@ -24,7 +32,7 @@ EX namespace inforder {
h1->s = hsA;
h1->cdata = NULL;
h1->distance = h->distance + (par ? -1 : 1);
h1->c7 = newCell(S7, h1);
h1->c7 = newCell(deg, h1);
return h1;
}