fn read_input(win: &Window) -> (u8, u8) {
    use Key::*;

    // Keys are set in the order Up, Down, Left, Right, Select, Start, A, B
    let (mut one, mut two) = (0, 0);
    for (i, &key) in [Up, Down, Left, Right, RightShift, Enter, N, M].iter().enumerate() {
        set_bitflag(&mut one, i as u8, win.is_key_down(key));
    }
    for (i, &key) in [W, S, A, D, LeftShift, Tab, X, C].iter().enumerate() {
        set_bitflag(&mut two, i as u8, win.is_key_down(key));
    }

    (one, two)
}
/// Read inputs for controller 1 & 2
Read inputs for controller 1 & 2
Read inputs for controller 1 & 2
fn read_input(win: &Window) -> (u8, u8) {
    use Key::*;
    // Keys are set in the order Up, Down, Left, Right, Select, Start, A, B
    let (mut one, mut two) = (0, 0);
    for (i, &key) in [Up, Down, Left, Right, RightShift, Enter, N, M].iter().enumerate() {
        set_bitflag(&mut one, i as u8, win.is_key_down(key));
    }
    for (i, &key) in [W, S, A, D, LeftShift, Tab, X, C].iter().enumerate() {
        set_bitflag(&mut two, i as u8, win.is_key_down(key));
    }
    (one, two)
}
fn read_input ( win : & Window ) -> ( u8 , u8 ) { use Key :: * ; // Keys are set in the order Up, Down, Left, Right, Select, Start, A, B let ( mut one , mut two ) = ( 0 , 0 ) ; for ( i , & key ) in [ Up , Down , Left , Right , RightShift , Enter , N , M ] . iter ( ) . enumerate ( ) { set_bitflag ( & mut one , i as u8 , win . is_key_down ( key ) ) ; } for ( i , & key ) in [ W , S , A , D , LeftShift , Tab , X , C ] . iter ( ) . enumerate ( ) { set_bitflag ( & mut two , i as u8 , win . is_key_down ( key ) ) ; } ( one , two ) }
Read inputs for controller 1 & 2
Read inputs for controller 1 & 2
win
&Window
win
&Window