public void checkCollisions() 
    {
        final Rectangle r3 = this.craft.getBounds();
        Rectangle r2;
        for (int i = 0; i < this.aliens.size(); i++) 
        {
            Alien a = (Alien)this.aliens.get(i);
            r2      = a.getBounds();
            if (r3.intersects(r2)) 
            {
                Sound.CRAFTDEATH.play();
                this.craft.setVisible(false);
                this.ingame  = false;
                this.endTime = System.currentTimeMillis();
            }
        }
        ArrayList ms = this.craft.getMissiles();
        for (int j = 0; j < ms.size(); j++) 
        {
            Missile m    = (Missile)ms.get(j);
            Rectangle r1 = m.getBounds();
            int k        = 0;
            while (k < aliens.size()) 
            {
                Alien a2 = (Alien)this.aliens.get(k);
                r2       = a2.getBounds();
                if (r1.intersects(r2)) 
                {
                    Sound.ALIENHIT.play();
                    if (a2.getHP() <= 0) 
                    {
                        a2.setVisible(Boolean.valueOf(false));
                        m.setVisible(Boolean.valueOf(false));
                        this.totalAliensKilled = this.totalAliensKilled + 1;
                        if (this.level4) 
                        {
                            this.ingame  = false;
                            this.won     = true;
                            this.craft.setVisible(false);
                            this.endTime = System.currentTimeMillis();
                        }
                    }
                    a2.setHP(a2.getHP() - 1);
                    m.setVisible(Boolean.valueOf(false));
                }
                k++;
            }
        }
    }