Pos represents a position on the Grid; the origin is bottom left.
Public Member Functions | |
| Pos (int x, int y) | |
| bool | operator== (const Pos &other) const |
| Pos | with_dir (const Direction dir) const |
| Helper method to give the position if it went in a certain direction. | |
Public Attributes | |
| int | x |
| int | y |
Returns a position if it moved in the given direction. Note, Pos::with_dir does NOT mutate the position this is called on.
For example: