Struct sirpent::state::Snake
[−]
[src]
pub struct Snake {
pub segments: Vec<Vector>,
// some fields omitted
}Fields
segments: Vec<Vector>
Methods
impl Snake[src]
fn new(segments: Vec<Vector>) -> Snake
fn is_head_at(&self, v: &Vector) -> bool
fn has_segment_at(&self, v: &Vector) -> bool
fn has_collided_into(&self, other: &Snake) -> bool
fn step_in_direction(&mut self, dir: Direction)
fn grow(&mut self)
Trait Implementations
impl PartialEq for Snake[src]
fn eq(&self, __arg_0: &Snake) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Snake) -> bool
This method tests for !=.
impl Eq for Snake[src]
impl Clone for Snake[src]
fn clone(&self) -> Snake
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Hash for Snake[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.