public int getNextEntityNum(Player player, int start) { boolean startPassed = false; for (Enumeration i = entities.elements(); i.hasMoreElements();) { final Entity entity = (Entity)i.nextElement(); if (entity.getId() == start) { startPassed = true; } else if (startPassed && player.equals(entity.getOwner()) && entity.isSelectable() ) { return entity.getId(); } } return getFirstEntityNum(player);
public int getNextEntityNum(int start) { return getNextEntityNum(turn, start);
    public int getNextEntityNum(Player player, int start) {        boolean startPassed = false;        for (Enumeration i = entities.elements(); i.hasMoreElements();) {            final Entity entity = (Entity)i.nextElement();            if (entity.getId() == start) {                startPassed = true;            } else if (startPassed && player.equals(entity.getOwner())                        && entity.isSelectable() ) {                return entity.getId();            }                  }        return getFirstEntityNum(player);    }