pub fn pixels(&self) -> Vec<(usize, usize)> {
        let x = self.registers.gx.borrow().value;
        let y = self.registers.gy.borrow().value;
        let mut v = vec![];
        for (idx, pixel) in self.sprite.pixels.iter().enumerate() {
            if *pixel {
                let this_x = (idx as i32 % 10) + x;
                let this_y = (idx as i32 / 10) + y;
                if 0 <= this_x && 119 >= this_x && 0 <= this_y && 99 >= this_y {
                    v.push((this_x as usize, this_y as usize));
                }
            }
        }
        v
    }
// Returns (x,y) vector of currently enabled pixels
Returns (x,y) vector of currently enabled pixels
Returns ( x y ) vector of currently enabled pixels
pub fn pixels(&self) -> Vec<(usize, usize)> {
        let x = self.registers.gx.borrow().value;
        let y = self.registers.gy.borrow().value;
        let mut v = vec![];
        for (idx, pixel) in self.sprite.pixels.iter().enumerate() {
            if *pixel {
                let this_x = (idx as i32 % 10) + x;
                let this_y = (idx as i32 / 10) + y;
                if 0 <= this_x && 119 >= this_x && 0 <= this_y && 99 >= this_y {
                    v.push((this_x as usize, this_y as usize));
                }
            }
        }
        v
    }
pub fn pixels ( & self ) -> Vec < ( usize , usize ) > { let x = self . registers . gx . borrow ( ) . value ; let y = self . registers . gy . borrow ( ) . value ; let mut v = vec ! [ ] ; for ( idx , pixel ) in self . sprite . pixels . iter ( ) . enumerate ( ) { if * pixel { let this_x = ( idx as i32 % 10 ) + x ; let this_y = ( idx as i32 / 10 ) + y ; if 0 <= this_x && 119 >= this_x && 0 <= this_y && 99 >= this_y { v . push ( ( this_x as usize , this_y as usize ) ) ; } } } v }
Returns (x,y) vector of currently enabled pixels
Returns ( x y ) vector of currently enabled pixels
&self
&self