pub fn inner_check_move(
        &self,
        map: &Map,
        players: &[Player],
        npcs: &[Box<dyn Enemy>],
        primary_direction: Direction,
        secondary_direction: Option<Direction>,
        x_add: i64,
        y_add: i64,
    ) -> (i64, i64) {
        let (mut x, mut y) = self.check_move(primary_direction, map, players, npcs, x_add, y_add);
        if let Some(secondary_direction) = secondary_direction {
            let (x2, y2) = self.check_move(
                secondary_direction,
                map,
                players,
                npcs,
                x_add + x,
                y_add + y,
            );
            x += x2;
            y += y2;
        }
        (x, y)
    }
/// `x_add` and `y_add` are used in case you want to move in two directions at once, so when
/// checking the second direction, you actually already "moved" and don't check a bad position.
`x_add` and `y_add` are used in case you want to move in two directions at once, so when
checking the second direction, you actually already "moved" and don't check a bad position.
` x_add ` and ` y_add ` are used in case you want to move in two directions at once so when checking the second direction you actually already " moved " and don ' t check a bad position .
pub fn inner_check_move(
        &self,
        map: &Map,
        players: &[Player],
        npcs: &[Box<dyn Enemy>],
        primary_direction: Direction,
        secondary_direction: Option<Direction>,
        x_add: i64,
        y_add: i64,
    ) -> (i64, i64) {
        let (mut x, mut y) = self.check_move(primary_direction, map, players, npcs, x_add, y_add);
        if let Some(secondary_direction) = secondary_direction {
            let (x2, y2) = self.check_move(
                secondary_direction,
                map,
                players,
                npcs,
                x_add + x,
                y_add + y,
            );
            x += x2;
            y += y2;
        }
        (x, y)
    }
pub fn inner_check_move ( & self , map : & Map , players : & [ Player ] , npcs : & [ Box < dyn Enemy > ] , primary_direction : Direction , secondary_direction : Option < Direction > , x_add : i64 , y_add : i64 , ) -> ( i64 , i64 ) { let ( mut x , mut y ) = self . check_move ( primary_direction , map , players , npcs , x_add , y_add ) ; if let Some ( secondary_direction ) = secondary_direction { let ( x2 , y2 ) = self . check_move ( secondary_direction , map , players , npcs , x_add + x , y_add + y , ) ; x += x2 ; y += y2 ; } ( x , y ) }
`x_add` and `y_add` are used in case you want to move in two directions at once, so when
checking the second direction, you actually already "moved" and don't check a bad position.
` x_add ` and ` y_add ` are used in case you want to move in two directions at once so when checking the second direction you actually already " moved " and don ' t check a bad position .
&self
map
&Map
players
&[Player]
npcs
&[Box<dyn Enemy>]
primary_direction
Direction
secondary_direction
Option<Direction>
x_add
i64
y_add
i64