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

3D:: alternate minefield adjacency rule

This commit is contained in:
Zeno Rogue
2019-04-08 16:16:16 +02:00
parent b88ef69f59
commit 039118425c
8 changed files with 119 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ namespace reg3 {
int loop, face;
vector<hyperpoint> cellshape;
vector<hyperpoint> vertices_only;
transmatrix spins[12], adjmoves[12];
@@ -169,6 +170,13 @@ namespace reg3 {
if(loop == 4) strafedist = adjcheck;
else strafedist = hdist(adjmoves[0] * C0, adjmoves[1] * C0);
vertices_only.clear();
for(hyperpoint h: cellshape) {
bool found = false;
for(hyperpoint h2: vertices_only) if(hdist(h, h2) < 1e-6) found = true;
if(!found) vertices_only.push_back(h);
}
}
void binary_rebase(heptagon *h, const transmatrix& V) {
@@ -505,6 +513,10 @@ namespace reg3 {
heptagon *getOrigin() override { return allh[0]; }
vector<cell*>& allcells() override { return acells; }
vector<hyperpoint> get_vertices(cell* c) override {
return vertices_only;
}
};
struct hrmap_reg3 : hrmap {
@@ -787,6 +799,9 @@ namespace reg3 {
return inverse(p1.second) * T * p2.second;
}
vector<hyperpoint> get_vertices(cell* c) override {
return vertices_only;
}
};
hrmap* new_map() {