mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
walker now automatically fixes spin
This commit is contained in:
parent
661743a19b
commit
b57c4c8d4e
2
hyper.h
2
hyper.h
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user