pub fn move_grid_cursor(&mut self, direction: Direction) -> Result<(), &'static str> {
        if let Some(new_cursor) = self.movement(&self.grid_cursor, direction) {
            self.set_grid_cursor(&new_cursor)?;

            Ok(())
        } else {
            Err("tried to move grid cursor out of bounds")
        }
    }
/// Moves the player's grid cursor in the given `direction`.
///
/// # Errors
///
/// Returns an error if moving the grid cursor in `direction` would move it out of bounds.
Moves the player's grid cursor in the given `direction`.
Moves the player ' s grid cursor in the given ` direction ` .
pub fn move_grid_cursor(&mut self, direction: Direction) -> Result<(), &'static str> {
        if let Some(new_cursor) = self.movement(&self.grid_cursor, direction) {
            self.set_grid_cursor(&new_cursor)?;
            Ok(())
        } else {
            Err("tried to move grid cursor out of bounds")
        }
    }
pub fn move_grid_cursor ( & mut self , direction : Direction ) -> Result < ( ) , & ' static str > { if let Some ( new_cursor ) = self . movement ( & self . grid_cursor , direction ) { self . set_grid_cursor ( & new_cursor ) ? ; Ok ( ( ) ) } else { Err ( " " ) } }
Moves the player's grid cursor in the given `direction`.
Moves the player ' s grid cursor in the given ` direction ` .
&mut self
direction
Direction
&mut self
direction
Direction
errors
Returns an error if moving the grid cursor in `direction` would move it out of bounds.
Returns an error if moving the grid cursor in ` direction ` would move it out of bounds .