mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-30 01:07:57 +00:00
created a function init_heptagon which does tailored_alloc and clears the data
This commit is contained in:
@@ -24,13 +24,11 @@ EX namespace inforder {
|
||||
heptagon *create_step(heptagon *h, int direction) {
|
||||
int deg = h->type;
|
||||
if(mixed()) deg = 7 - deg;
|
||||
auto h1 = tailored_alloc<heptagon> (deg);
|
||||
auto h1 = init_heptagon(deg);
|
||||
bool par = h->s == hsA && direction == 0;
|
||||
h->c.connect(direction, h1, par ? 1 + hrand(2) : 0, false);
|
||||
|
||||
h1->alt = NULL;
|
||||
h1->s = hsA;
|
||||
h1->cdata = NULL;
|
||||
h1->distance = h->distance + (par ? -1 : 1);
|
||||
h1->c7 = newCell(deg, h1);
|
||||
|
||||
|
Reference in New Issue
Block a user