fn object_move_by(id: usize, x_amount: i32, y_amount: i32, map: &Map, objects: &mut [Object]) {
    let (x, y) = objects[id].pos();
    if !tile_is_blocked(x + x_amount, y + y_amount, map, objects) {
        objects[id].set_pos(x + x_amount, y + y_amount);
    }
}
/// move by the given amount, if the destination is not blocked
move by the given amount, if the destination is not blocked
move by the given amount if the destination is not blocked
fn object_move_by(id: usize, x_amount: i32, y_amount: i32, map: &Map, objects: &mut [Object]) {
    let (x, y) = objects[id].pos();
    if !tile_is_blocked(x + x_amount, y + y_amount, map, objects) {
        objects[id].set_pos(x + x_amount, y + y_amount);
    }
}
fn object_move_by ( id : usize , x_amount : i32 , y_amount : i32 , map : & Map , objects : & mut [ Object ] ) { let ( x , y ) = objects [ id ] . pos ( ) ; if ! tile_is_blocked ( x + x_amount , y + y_amount , map , objects ) { objects [ id ] . set_pos ( x + x_amount , y + y_amount ) ; } }
move by the given amount, if the destination is not blocked
move by the given amount if the destination is not blocked
id
usize
x_amount
i32
y_amount
i32
map
&Map
objects
&mut [Object]