source/ship.c
void ship_kill(struct Ship* ship) {
    ship->movement_counter = 0;
    ship->update_frames = 0;
    ship->x = 55;
    ship->y = -25;
    sprite_position(ship->sprite, ship->x, ship->y);
    ship->visible = 0;
    ship->frames_hidden = 0;
    ship->bullet_index = 0;
    for (int i = 0; i < SHIP_NUM_BULLTETS; i++) {
        ship->bullets[i].x = 0;
        ship->bullets[i].y = -100;
        sprite_position(ship->bullets[i].bullet_sprite, ship->bullets[i].x, ship->bullets[i].y);
        ship->bullets[i].alive = 0;
    }

    /* play the killed sound */
    play_sound(shipkill_16K_mono, shipkill_16K_mono_bytes, 16000, 'B');
}
/* set the ship off screen after its hit */
set the ship off screen after its hit
set the ship off screen after its hit
void ship_kill(struct Ship* ship) {
    ship->movement_counter = 0;
    ship->update_frames = 0;
    ship->x = 55;
    ship->y = -25;
    sprite_position(ship->sprite, ship->x, ship->y);
    ship->visible = 0;
    ship->frames_hidden = 0;
    ship->bullet_index = 0;
    for (int i = 0; i < SHIP_NUM_BULLTETS; i++) {
        ship->bullets[i].x = 0;
        ship->bullets[i].y = -100;
        sprite_position(ship->bullets[i].bullet_sprite, ship->bullets[i].x, ship->bullets[i].y);
        ship->bullets[i].alive = 0;
    }
    play_sound(shipkill_16K_mono, shipkill_16K_mono_bytes, 16000, 'B');
}
void ship_kill ( struct Ship * ship ) { ship -> movement_counter = 0 ; ship -> update_frames = 0 ; ship -> x = 55 ; ship -> y = -25 ; sprite_position ( ship -> sprite , ship -> x , ship -> y ) ; ship -> visible = 0 ; ship -> frames_hidden = 0 ; ship -> bullet_index = 0 ; for ( int i = 0 ; i < SHIP_NUM_BULLTETS ; i ++ ) { ship -> bullets [ i ] . x = 0 ; ship -> bullets [ i ] . y = -100 ; sprite_position ( ship -> bullets [ i ] . bullet_sprite , ship -> bullets [ i ] . x , ship -> bullets [ i ] . y ) ; ship -> bullets [ i ] . alive = 0 ; } play_sound ( shipkill_16K_mono , shipkill_16K_mono_bytes , 16000 , ' ' ) ; }
set the ship off screen after its hit
set the ship off screen after its hit
/* play the killed sound */