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

removed the MAX_EDGE limit

This commit is contained in:
Zeno Rogue
2020-01-18 16:03:32 +01:00
parent a6da5ded75
commit 2271a67506
24 changed files with 238 additions and 190 deletions

View File

@@ -12,25 +12,16 @@ namespace hr {
EX namespace quotientspace {
bool operator == (const code& c1, const code &c2) {
for(int i=0; i<=S7; i++) if(c1.c[i] != c2.c[i]) return false;
return true;
}
bool operator < (const code& c1, const code &c2) {
for(int i=0; i<=S7; i++) if(c1.c[i] != c2.c[i]) return c1.c[i] < c2.c[i];
return false;
}
int cod(heptagon *h) {
return zebra40(h->c7);
}
code get(heptspin hs) {
code res;
res.c[0] = cod(hs.at);
res.connections.resize(S7);
res.connections[0] = cod(hs.at);
for(int i=1; i<=S7; i++) {
res.c[i] = cod((hs + wstep).at);
res.connections[i] = cod((hs + wstep).at);
hs += 1;
}
return res;
@@ -45,7 +36,11 @@ EX namespace quotientspace {
#if HDR
struct code {
int c[MAX_EDGE+1];
vector<int> connections;
bool operator == (const code &c2) const { return connections == c2.connections; }
bool operator < (const code &c2) const { return connections < c2.connections; }
};
struct hrmap_quotient : hrmap_standard {