mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-11-28 08:23:08 +00:00
walker now automatically fixes spin
This commit is contained in:
1 parent
661743a19b
commit
b57c4c8d4e
1 file changed
+1
-1
@@ -635,7 +635,7 @@ template<class T> struct walker {
|
||||
T *at;
|
||||
int spin;
|
||||
bool mirrored;
|
||||
walker<T> (T *at = NULL, int s = 0, bool m = false) : at(at), spin(s), mirrored(m) { }
|
||||
walker<T> (T *at = NULL, int s = 0, bool m = false) : at(at), spin(s), mirrored(m) { if(at) s = at->c.fix(s); }
|
||||
walker<T>& operator += (int i) {
|
||||
spin = at->c.fix(spin+(mirrored?-i:i));
|
||||
return (*this);
|
||||
|
||||
Reference in new issue
Block a user