pub struct Game { /* private fields */ }
Implementations§
Source§impl Game
impl Game
pub fn new(map: Map, player_position: PlayerPosition) -> Result<Self, InitError>
pub fn map(&self) -> &Map
pub fn place_block( &mut self, point: CoordPair, block: PlaceableBlock, ) -> Result<(), AccessError>
pub fn player(&self) -> &Player
pub fn move_player_pointer( &mut self, direction: Direction, ) -> Result<(), MovePlayerError>
pub fn move_player_head( &mut self, direction: Direction, ) -> Result<(), MovePlayerError>
pub fn make_player_face( &mut self, direction: Direction, ) -> Result<(), MovePlayerError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Game
impl RefUnwindSafe for Game
impl Send for Game
impl Sync for Game
impl Unpin for Game
impl UnwindSafe for Game
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