Struct screeps::pathfinder::SearchOptions
source · pub struct SearchOptions<F>where
F: FnMut(RoomName) -> MultiRoomCostResult,{ /* private fields */ }
Implementations§
source§impl<F> SearchOptions<F>where
F: FnMut(RoomName) -> MultiRoomCostResult,
impl<F> SearchOptions<F>where F: FnMut(RoomName) -> MultiRoomCostResult,
pub fn new(callback: F) -> Self
pub fn room_callback<F2>(self, callback: F2) -> SearchOptions<F2>where F2: FnMut(RoomName) -> MultiRoomCostResult,
sourcepub fn plain_cost(self, cost: u8) -> Self
pub fn plain_cost(self, cost: u8) -> Self
Sets plain cost - default 1
.
sourcepub fn swamp_cost(self, cost: u8) -> Self
pub fn swamp_cost(self, cost: u8) -> Self
Sets swamp cost - default 5
.
sourcepub fn heuristic_weight(self, weight: f64) -> Self
pub fn heuristic_weight(self, weight: f64) -> Self
Sets heuristic weight - default 1.2
.