pub struct Minotaur {
pub kills: usize,
/* private fields */
}Fields§
§kills: usizeImplementations§
Source§impl Minotaur
impl Minotaur
pub fn new( name: String, maze_id: usize, position: Position, speed: u64, vision: usize, aggression: f64, ) -> Self
pub fn update(&mut self, maze: &mut Maze, visible_heros: Vec<&Hero>)
pub fn is_chasing(&self, player_id: PlayerId) -> bool
pub fn is_chasing_someone(&self) -> bool
Trait Implementations§
Source§impl Entity for Minotaur
impl Entity for Minotaur
fn id(&self) -> PlayerId
fn name(&self) -> &str
fn vision(&self) -> usize
fn speed(&self) -> u64
fn position(&self) -> Position
fn direction(&self) -> Direction
fn maze_id(&self) -> usize
fn view(&self) -> View
fn movement_recovery_duration(&self) -> Duration
Auto Trait Implementations§
impl Freeze for Minotaur
impl RefUnwindSafe for Minotaur
impl Send for Minotaur
impl Sync for Minotaur
impl Unpin for Minotaur
impl UnsafeUnpin for Minotaur
impl UnwindSafe for Minotaur
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more