1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-03 19:27:54 +00:00

movei from cellwalker, old empathyMove removed

This commit is contained in:
Zeno Rogue
2019-11-22 18:12:50 +01:00
parent 6d44105fef
commit 9521b622e1
4 changed files with 4 additions and 7 deletions

View File

@@ -460,6 +460,7 @@ struct movei {
else t = s->move(d);
}
movei(cell *_s, cell *_t, int _d) : s(_s), t(_t), d(_d) {}
movei(cellwalker cw) : s(cw.at), t(cw.cpeek()), d(cw.spin) {}
movei rev() const { return movei(t, s, rev_dir_or(d)); }
int dir_or(int x) const { return proper() ? d : x; }
int rev_dir_or(int x) const { return proper() ? s->c.spin(d) : x; }