pub fn check_for_hang(i: usize, stack: &Stack, blocks: &mut WriteStorage<'_, Block>) -> bool {
    // condition based on another block in a different lifetime
    let mut down_condition: bool = false;

    // check if is in vec boundary
    if i > COLS {
        let down = blocks.get_mut(stack.from_i(i - COLS)).unwrap();
        down_condition = down.is_empty() || down.state == "HANG";
    }

    !blocks.get_mut(stack.from_i(i)).unwrap().is_empty() && down_condition
}
// checks wether the block below is empty or falling, also checks wether this block is empty
checks wether the block below is empty or falling, also checks wether this block is empty
checks wether the block below is empty or falling also checks wether this block is empty
pub fn check_for_hang(i: usize, stack: &Stack, blocks: &mut WriteStorage<'_, Block>) -> bool {
    // condition based on another block in a different lifetime
    let mut down_condition: bool = false;
    // check if is in vec boundary
    if i > COLS {
        let down = blocks.get_mut(stack.from_i(i - COLS)).unwrap();
        down_condition = down.is_empty() || down.state == "HANG";
    }
    !blocks.get_mut(stack.from_i(i)).unwrap().is_empty() && down_condition
}
pub fn check_for_hang ( i : usize , stack : & Stack , blocks : & mut WriteStorage < ' _ , Block > ) -> bool { // condition based on another block in a different lifetime let mut down_condition : bool = false ; // check if is in vec boundary if i > COLS { let down = blocks . get_mut ( stack . from_i ( i - COLS ) ) . unwrap ( ) ; down_condition = down . is_empty ( ) || down . state == " " ; } ! blocks . get_mut ( stack . from_i ( i ) ) . unwrap ( ) . is_empty ( ) && down_condition }
checks wether the block below is empty or falling, also checks wether this block is empty
checks wether the block below is empty or falling also checks wether this block is empty
i
usize
stack
&Stack
blocks
&mut WriteStorage<'_, Block>
i
usize
stack
&Stack
blocks
&mut WriteStorage<'_, Block>