-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (28 loc) · 1.17 KB
/
Program.cs
File metadata and controls
34 lines (28 loc) · 1.17 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
using Command.Commands;
namespace Command
{
internal class Program
{
static void Main(string[] args)
{
Player player = new Player(5, 5, 50);
Enemy goblin = new Enemy(100);
InputHandler inputHandler = new InputHandler();
inputHandler.ExecuteCommand(new MoveCommand(player, 1, 1));
inputHandler.ExecuteCommand(new MoveCommand(player, -1, 1));
inputHandler.ExecuteCommand(new MoveCommand(player, -1, 0));
inputHandler.ExecuteCommand(new MoveCommand(player, 0, 0));
inputHandler.ExecuteCommand(new AttackCommand(goblin, 10));
inputHandler.ExecuteCommand(new AttackCommand(goblin, 5));
inputHandler.ExecuteCommand(new HealCommand(player, 25));
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
inputHandler.UndoLastCommand();
}
}
}