1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-27 11:57:40 +00:00

crystal:: added multi-dimensional geometries (referred to as crystal), available via CLI for now

This commit is contained in:
Zeno Rogue
2018-11-30 16:31:55 +01:00
parent cd357303b9
commit fd3b030119
9 changed files with 483 additions and 4 deletions

View File

@@ -140,10 +140,10 @@ transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hin
int sp = h2->c.spin(d);
return gm * heptmove[sp] * spin(2*M_PI*d/S7) * where;
}
if(among(geometry, gFieldQuotient, gBring, gMacbeath)) {
if(among(geometry, gFieldQuotient, gBring, gMacbeath, gCrystal)) {
int bestdist = 1000, bestd = 0;
for(int d=0; d<S7; d++) {
int dist = celldistance(h2->move(d)->c7, c1);
int dist = celldistance(h2->cmove(d)->c7, c1);
if(dist < bestdist) bestdist = dist, bestd = d;
}
int sp = h2->c.spin(bestd);