Function screeps::game::map::find_route
source · pub fn find_route<F>(
from: RoomName,
to: RoomName,
options: Option<FindRouteOptions<F>>
) -> Result<Vec<RouteStep>, ErrorCode>
Expand description
Get the route from a given room leading toward a destination room, with
an optional FindRouteOptions
parameter allowing control over the
costs to enter rooms.
Returns an Array
with an object per room in the route, with keys
exit
containing an ExitDirection
and room
containing room name
as a JsString
.