-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSource.cpp
More file actions
140 lines (125 loc) · 4.83 KB
/
Source.cpp
File metadata and controls
140 lines (125 loc) · 4.83 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
//written by Alexander Molina Nasaev
//Caution! Wet code!
// ``````` ```````
//```` `````
//`` ```
//`
// ./ssss/.
// -hy+:-::+yh-
// od/::::::::/do
// `yh::::::::::::yy`
// `hs::::::::::::::sh`
// .do::::::::::::::::od.
// -m+::::://:::::::::::+m-
// /m/:::/++//+/::::::::::/m/
// od::::-::sms::::::::::::::do
// sh::::::::dNd:::::::::::::::hs
// `hy::/o+::::dNd:-::::::::::::::yh`
// .do::dNNNN/::dNd:::::::::::::::::sd.
// -m+:::NNNNNoodNNs::::::::::::::::::+m-
// :m/:::::oyhdNNNm/::::::::::::::::::::/m:
// +d/::::::smNNNNNNh+::::::+oyho:::::::-:/d+
// sd::::::yNNdsmNNNNNNNmmmNNNNdmNms:::::::::ds
// `yy:::::::NNy:::sNNNNNNNNNh+::::omNms::::::::yy`
// `ds::::::::NNy:::::+shdmmmNNNdyo+::odm/::::::::sd`
// .do:::::::::NNy:::::::::::::/oydNNNs::::::-::::::od.
// -m+:::::::::/yd+::::::::::::::::::+dNNs::::/ys:+hd/+m-
// /m/::::::::://+++/:::::::::::::::::::+dNN+:/+:/yy+:::/m/
// /m::-::::::::::::::::::::::::::::://////+o::::+oo+::-:::m/
// `N/::+ssssssssssssssssssssssssssyhyyssyyssssssssssssss/::/N`
// -N:::shdddddhdddddddddddddddddddhddddddhddddddhddddddh+:::N-
// hy::::::::::::::::::::::::::::::::::::::::::::::::::::::yh
// `ohs+::::::::::::::::::::::::::::::::::::::::::::::::+sho`
// -+osssssssssssssssssssssssssssssssssssssssssssssso+-
//`` ``
//``` ```
//`````` ``````
//``````` ```````
#include "clocks.h"
#include <ctime>
/*Like a professional programmer i'm using those parameters. Even if they are
unnecessary*/
int main(int argc, char* argv[])
{
setlocale(LC_ALL, "rus");
system("title TPClock");
OutManager outManager;
outManager.printMessage("TPClock is greeting you!");
outManager.printMessage("\n");
outManager.printMessage("TPClock will add you to travel to the future");
outManager.printMessage("\n");
Sleep(2000);
/*My imagination was fucked*/
SkyNet skynet;
TimeFinder timeFinder;
Time time, answerTime;
IATA* strategy;
/*Please, don't ask me about this shit!*/
bool wrong_command = true;
while (wrong_command)
{
wrong_command = false;
system("cls");
outManager.printMessage("Enter 1 to send DeLorian");
outManager.printMessage("\n");
outManager.printMessage("Enter 2 to send T800");
outManager.printMessage("\n");
outManager.printMessage("Enter 3 to exit");
outManager.printMessage("\n");
int command;
cin >> command;
switch (command)
{
case 1:
{
strategy = new DeLorean;
skynet.setStrategy(strategy);
};
break;
case 2:
{
strategy = new T800;
skynet.setStrategy(strategy);
};
break;
case 3:
{
system("cls");
outManager.printMessage("Ïîêà!");
outManager.printMessage("\n");
Sleep(3000);
exit(1);
};
break;
default:
{
system("cls");
wrong_command = true;
outManager.printMessage("Are you kidding me? Read the instruction one more time");
outManager.printMessage("\n");
outManager.printMessage("Let's try again!");
outManager.printMessage("\n");
Sleep(2000);
};
};
};
system("cls");
time = timeFinder.findTime();
answerTime = skynet.getAnswer();
outManager.printMessage("Start time ");
outManager.printMessage(time.getHours());
outManager.printMessage(":");
outManager.printMessage(time.getMinutes());
outManager.printMessage(":");
outManager.printMessage(time.getSeconds());
outManager.printMessage("\n");
outManager.printMessage("Finish time ");
outManager.printMessage(answerTime.getHours());
outManager.printMessage(":");
outManager.printMessage(answerTime.getMinutes());
outManager.printMessage(":");
outManager.printMessage(answerTime.getSeconds());
outManager.printMessage("\n");
system("pause");
return 0;
};