your's because i understood it the best for if i need to modify it further
ArrayList<Alien> currentContacts = new ArrayList<Alien>(); currentContacts = (ArrayList<Alien>)getIntersectingObjects(Alien.class); { for (Alien alien : currentContacts) { if (!aliensContacted.contains(alien)) { aliensContacted.add(alien); lives--; if (lives == 0) { String text = "Your score was: " + totalCount; JOptionPane.showMessageDialog(null, text); reset(); Greenfoot.stop(); return; } } } }