Trait sirpent::state::grids::GridTrait
[−]
[src]
pub trait GridTrait: PartialEq + Eq + Copy + Serialize + Deserialize + Clone + Debug {
type Vector: VectorTrait;
fn dimensions(&self) -> Vec<isize>;
fn is_within_bounds(&self, v: Self::Vector) -> bool;
fn cells(&self) -> Vec<Self::Vector>;
fn random_cell<R: Rng>(&self, rng: &mut R) -> Self::Vector;
}
Associated Types
type Vector: VectorTrait
Required Methods
fn dimensions(&self) -> Vec<isize>
fn is_within_bounds(&self, v: Self::Vector) -> bool
fn cells(&self) -> Vec<Self::Vector>
fn random_cell<R: Rng>(&self, rng: &mut R) -> Self::Vector
Implementors
impl GridTrait for SquareGridimpl GridTrait for HexagonGridimpl GridTrait for TriangleGrid