use crate::flowfields::{portal::PortalWindow, sectors::SectorID};
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct RouteStep {
sector: SectorID,
goal: usize,
portal: Option<PortalWindow>,
}
impl RouteStep {
pub fn new(sector: &SectorID, goal: usize, portal: Option<PortalWindow>) -> Self {
RouteStep {
sector: *sector,
goal,
portal,
}
}
pub fn get_sector(&self) -> &SectorID {
&self.sector
}
pub fn get_goal(&self) -> usize {
self.goal
}
pub fn portal(&self) -> &Option<PortalWindow> {
&self.portal
}
}