public int getPlayerIndex(String IP) {
    	int found = -1;
    	for (int i = 0; i < opponents.size(); i++) {
    		if (opponents.get(i).name.equals(IP))
    			found = i;
    	}
    	return found;
    }