Exemplo n.º 1
0
    public ManureType CleanFloor()
    {
        ManureType returnValue = new ManureType();

        returnValue.amount = liquid.CleanStore().amount;

        return(returnValue);
    }
Exemplo n.º 2
0
    public void OnCleanFloor(DoubleType numberOfAnimals)
    {
        ManureType water = new ManureType();

        water.amount  = WashingWater * numberOfAnimals.Value / 1000.0;
        water.amount += Solid.CleanStore().amount;
        water.amount += liquid.CleanStore().amount;
        bool found = false;

        for (int i = 0; i < MyPaddock.Children.Count(); i++)
        {
            if (MyPaddock.Children[i].Name.CompareTo(WhereTo) == 0)
            {
                MyPaddock.Children[i].Publish("RcvManure", water);
            }
        }
        if (found == false)
        {
            throw new Exception("Floor::OnCleanFloor: cannot move manure to " + WhereTo.ToString());
        }
    }