-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
46 lines (21 loc) · 886 Bytes
/
Program.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using Singleton;
internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
// Both machine1 and machine2 will point to the same object.
// Usage
//ChocolateMachine machine1 = ChocolateMachine.GetInstance();
//ChocolateMachine machine2 = ChocolateMachine.GetInstance();
//Learn_GetSingleton sing1 = Learn_GetSingleton.GetInstance();
//Learn_GetSingleton sing2 = Learn_GetSingleton.GetInstance();
//IVehicle vard = VehicleFactory.getVechicle("car");
//vard.Describe();
GameMaster gameMaster = new GameMaster();
gameMaster.RegisterPlayer(new Player("Kaushal"));
gameMaster.RegisterPlayer(new Player("Manoj"));
gameMaster.RegisterPlayer(new Player("Patel"));
gameMaster.GameOver();
}
}