Example #1
0
        public bool IsEnoughOfPower(Generator generator, Electronics device, LinkedList <Electronics> listOfDevicesInNetWork)
        {
            bool isEnoughOfPower = false;

            if (generator.GetAvailablePower() - device.Power >= 0)
            {
                isEnoughOfPower = true;
            }
            return(isEnoughOfPower);
        }
Example #2
0
 public void RenewAvailablePower(Electronics device)
 {
     AvailablePower += device.Power;
 }
Example #3
0
 public void UpdateAvailablePower(Electronics device)
 {
     AvailablePower -= device.Power;
 }