Trait sirpent::state::grids::VectorTrait
[−]
[src]
pub trait VectorTrait: PartialEq + Eq + Copy + Serialize + Deserialize + Clone + Debug { type Direction: DirectionTrait; fn distance(&self, other: &Self) -> usize; fn neighbour(&self, direction: &Self::Direction) -> Self; fn neighbours(&self) -> Vec<Self>; }
Associated Types
type Direction: DirectionTrait
Required Methods
fn distance(&self, other: &Self) -> usize
fn neighbour(&self, direction: &Self::Direction) -> Self
fn neighbours(&self) -> Vec<Self>
Implementors
impl VectorTrait for SquareVector
impl VectorTrait for HexagonVector
impl VectorTrait for TriangleVector