-
Notifications
You must be signed in to change notification settings - Fork 1
/
interactive.cpp
45 lines (37 loc) · 937 Bytes
/
interactive.cpp
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
#include "interactive.h"
#include "Battle.h"
interactive::interactive(Battle* pApp) : action(pApp)
{
}
void interactive::Execute()
{
bool flag = true;
int time = 0;
pManager->LOAD();
while (flag)
{
flag = pManager->stepbystep_and_interactive_battle();
pManager->getgui()->ResetDrawingList();
pManager->getgui()->waitForClick();
}
pManager->Save();
pManager->getgui()->waitForClick();
if (pManager->castlelose() == true)
{
pManager->getgui()->PrintMessage("Extraordinarily well-trained soliders, you got the castle down");
pManager->getgui()->waitForClick();
}
else if (pManager->battleDraw())
{
pManager->getgui()->PrintMessage("Fight is Over, Draw. Peace");
pManager->getgui()->waitForClick();
}
else
{
pManager->getgui()->PrintMessage("Mighty Castle, All enemies killed");
pManager->getgui()->waitForClick();
}
}
interactive::~interactive()
{
}