mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
torus generates spin correctly (orientable only)
This commit is contained in:
parent
939c979f19
commit
d537b05fb3
@ -369,14 +369,14 @@ struct hrmap_torus : hrmap_euclid_any {
|
||||
build_euclidean_moves(all[i], iv, [&] (int delta, int d, int d2) {
|
||||
auto im = vec_to_id_mirror(iv + delta);
|
||||
all[i]->move(d) = all[im.first];
|
||||
all[i]->c.setspin(d, im.second, false);
|
||||
all[i]->c.setspin(d, d2, im.second);
|
||||
});
|
||||
}
|
||||
for(cell *c: all) for(int d=0; d<c->type; d++) {
|
||||
if(nonorientable) for(cell *c: all) for(int d=0; d<c->type; d++) {
|
||||
cell *c2 = c->move(d);
|
||||
for(int d2=0; d2<c2->type; d2++)
|
||||
if(c2->move(d2) == c)
|
||||
c->c.setspin(d, d2, c->c.spin(d));
|
||||
c->c.setspin(d, d2, c->c.mirror(d));
|
||||
}
|
||||
celllister cl(gamestart(), 100, 100000000, NULL);
|
||||
dists.resize(q);
|
||||
|
Loading…
Reference in New Issue
Block a user