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:
12
inforder.cpp
12
inforder.cpp
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user