-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
50 lines (46 loc) · 1.79 KB
/
Copy pathProgram.cs
File metadata and controls
50 lines (46 loc) · 1.79 KB
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
47
48
49
50
using StrategyExample.Item;
using StrategyExample.People;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StrategyExample
{
internal class Program
{
public static List<IPeople> characters = new List<IPeople>();
public static void Main(string[] args)
{
characters.Add(new ManLeo());
var man = characters.Last();
OutputEmptyLine();
man.GetInventory().AddItem(new Tomato());
man.GetInventory().items.Last().Examine();
man.GetInventory().items.Last().TryEat();
man.GetInventory().items.Last().TryRead();
OutputEmptyLine();
man.GetInventory().AddItem(new RottenApple());
man.GetInventory().items.Last().Examine();
man.GetInventory().items.Last().TryEat();
man.GetInventory().items.Last().TryRead();
OutputEmptyLine();
man.GetInventory().AddItem(new BurntBook());
man.GetInventory().items.Last().Examine();
man.GetInventory().items.Last().TryEat();
man.GetInventory().items.Last().TryRead();
OutputEmptyLine();
man.GetInventory().AddItem(new TheWhaleBook());
man.GetInventory().items.Last().Examine();
man.GetInventory().items.Last().TryEat();
man.GetInventory().items.Last().TryRead();
OutputEmptyLine();
man.GetInventory().AddItem(new EatableBook());
man.GetInventory().items.Last().Examine();
man.GetInventory().items.Last().TryEat();
man.GetInventory().items.Last().TryRead();
Console.ReadLine();
}
public static void OutputEmptyLine() => Console.WriteLine();
}
}