diff --git a/Source/engine.h b/Source/engine.h index a965b2844..e33a4030a 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -202,6 +202,13 @@ struct Point { return offset.x + offset.y; } + + int WalkingDistance(Point other) const + { + Point offset = abs(*this - other); + + return std::max(offset.x, offset.y); + } }; struct Size {