public int getFirstEntityNum(Player player) { for (Enumeration i = entities.elements(); i.hasMoreElements();) { final Entity entity = (Entity)i.nextElement(); if (player.equals(entity.getOwner()) && entity.isSelectable()) { return entity.getId(); } } return -1;
public int getFirstEntityNum() { return getFirstEntityNum(turn);
    public int getFirstEntityNum(Player player) {        for (Enumeration i = entities.elements(); i.hasMoreElements();) {            final Entity entity = (Entity)i.nextElement();            if (player.equals(entity.getOwner()) && entity.isSelectable()) {                return entity.getId();            }        }        return -1;    }