/// <summary> /// Adds kernels to the machine. /// </summary> /// <param name="kernelsAdded"> /// The <see cref="AddKernels"/> object defining the bowl and number of kernels to add. /// </param> public void AddNewKernels(AddKernels kernelsAdded) { lock (_lock) { _kernelsInMachine += kernelsAdded.Kernels; if (_kernelsInMachine > MaxKernals) { _kernelsInMachine = MaxKernals; } // If a new client is added, this client 'pushes' the old client out of the way for popcorn. // (Multiple clients could have popcorn, however popcorn is fought over) _bowlName = kernelsAdded.ClientAddress; } }
public void AddKernals(AddKernels kernelsAdded) { _machine.AddNewKernels(kernelsAdded); }