mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-19 20:40:10 +00:00
cwrev -- reverse the cellwalker
This commit is contained in:
parent
863a065821
commit
33d7ce5ca9
8
cell.cpp
8
cell.cpp
@ -677,6 +677,14 @@ void cwstep(cellwalker& cw) {
|
|||||||
cw.spin = nspin;
|
cw.spin = nspin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cwrev(cellwalker& cw) {
|
||||||
|
cwspin(cw, cw.c->type/2 + ((cw.c->type&1)?hrand(2):0));
|
||||||
|
}
|
||||||
|
|
||||||
|
void cwrevstep(cellwalker& cw) {
|
||||||
|
cwrev(cw); cwstep(cw);
|
||||||
|
}
|
||||||
|
|
||||||
void eumerge(cell* c1, cell *c2, int s1, int s2) {
|
void eumerge(cell* c1, cell *c2, int s1, int s2) {
|
||||||
if(!c2) return;
|
if(!c2) return;
|
||||||
c1->mov[s1] = c2; tsetspin(c1->spintable, s1, s2);
|
c1->mov[s1] = c2; tsetspin(c1->spintable, s1, s2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user