-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
32 lines (25 loc) · 899 Bytes
/
Program.cs
File metadata and controls
32 lines (25 loc) · 899 Bytes
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
28
29
30
31
32
using System;
using Task.Model;
namespace Task
{
internal class Program
{
private static void Main(string[] args)
{
var totalSeconds = DateTime.Now.Subtract(DateTime.MinValue).TotalSeconds;
var rand = new Random((int)totalSeconds);
var tills = new TillsList();
var humans = new HumansQueue();
tills.Add(new Till("1", rand.Next(1) + 1));
tills.Add(new Till("2", rand.Next(2) + 1));
tills.Add(new Till("3", rand.Next(3) + 1));
//очередь в магазин
humans.Enqueue(new Child(rand.Next(10)+1));
humans.Enqueue(new Woman(rand.Next(15) + 1));
humans.Enqueue(new Man(rand.Next(5) + 1));
var shop = new Shop(tills, humans);
shop.Work(10,rand);
Console.ReadKey();
}
}
}