protected StringMessage checkProduction(Territory to, Collection units, PlayerID player) { Territory producer = getProducer(to, player);   TerritoryAttatchment ta = TerritoryAttatchment.get(producer);   if(isFourthEdition() && ta.getProduction() ==0) { return new StringMessage("Cant place factory, that territory cant produce any units" + producer.getName(), true); }    int maxUnitsToBePlaced = getMaxUnitsToBePlaced(to, player); if (maxUnitsToBePlaced <= 0) return new StringMessage("Cannot place " + units.size() + " more units in " + producer.getName(), true);  return null; }
protected StringMessage checkProduction(PlaceMessage placeMessage, PlayerID player) { Territory to = placeMessage.getTo(); Collection units = placeMessage.getUnits(); return checkProduction(to, units, player); }
    protected StringMessage checkProduction(Territory to, Collection units, PlayerID player)    {        Territory producer = getProducer(to, player);               //if its an original factory then unlimited production        TerritoryAttatchment ta = TerritoryAttatchment.get(producer);          //4th edition, you cant place factories in territories with no production        if(isFourthEdition() && ta.getProduction() ==0)        {            return new StringMessage("Cant place factory, that territory cant produce any units" + producer.getName(), true);        }        		int maxUnitsToBePlaced = getMaxUnitsToBePlaced(to, player);	if (maxUnitsToBePlaced <= 0)            return new StringMessage("Cannot place " + units.size() + " more units in " + producer.getName(), true);        return null;    }