fn remove_planes(&mut self) {
        let mut i = 0;
        while i != self.planes.len() {
            if self.planes[i].hp().is_dead() {
                self.cash += self.planes[i].bounty() as i32;
                self.planes.remove(i);
            } else if self.planes[i].x() >= self.width.into() {
                self.hp.take_damage(self.planes[i].damage());
                self.planes.remove(i);
            } else {
                i += 1;
            }
        }
    }
/// Remove planes if they complete the track or get destroyed
Remove planes if they complete the track or get destroyed
Remove planes if they complete the track or get destroyed
fn remove_planes(&mut self) {
        let mut i = 0;
        while i != self.planes.len() {
            if self.planes[i].hp().is_dead() {
                self.cash += self.planes[i].bounty() as i32;
                self.planes.remove(i);
            } else if self.planes[i].x() >= self.width.into() {
                self.hp.take_damage(self.planes[i].damage());
                self.planes.remove(i);
            } else {
                i += 1;
            }
        }
    }
fn remove_planes ( & mut self ) { let mut i = 0 ; while i != self . planes . len ( ) { if self . planes [ i ] . hp ( ) . is_dead ( ) { self . cash += self . planes [ i ] . bounty ( ) as i32 ; self . planes . remove ( i ) ; } else if self . planes [ i ] . x ( ) >= self . width . into ( ) { self . hp . take_damage ( self . planes [ i ] . damage ( ) ) ; self . planes . remove ( i ) ; } else { i += 1 ; } } }
Remove planes if they complete the track or get destroyed
Remove planes if they complete the track or get destroyed
&mut self
&mut self