-
Notifications
You must be signed in to change notification settings - Fork 0
/
Utilisation.cs
27 lines (26 loc) · 951 Bytes
/
Utilisation.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Symulacja_Cyfrowa
{
class Utilisation : Event
{
private int _eventTime;
private string _type;
public Utilisation(int eventTime, string type) : base(eventTime, type)
{
_eventTime = eventTime;
_type = Type;
}
public override void Execute(List<Event> scheduler,BloodStore bloodStorage, PatientQueue patientQ)
{
bloodStorage.BloodLevel = --bloodStorage.BloodLevel; // Changes value of BloodLevel
Sorted(scheduler);
bloodStorage.BloodStorageList.RemoveAt(0); // Removes Blood from BloodList
Console.WriteLine("\n### UTILISATION -> Current blood level: " + bloodStorage.BloodLevel + " ###");
}
}
}