-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver.cpp
214 lines (176 loc) · 7.87 KB
/
driver.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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
// Names: Noe Lomeli, Nancy Gomez
// Date: April - May 2016
// Project: Thermonuclear War (WarGames inspired)
#include "Map.h"
#include "thermonuclearWar.h"
#include "country.h"
#include "tictactoe.h"
#include <thread>
#include <chrono>
#include <iostream>
#include <cstdlib>
#include <iostream>
#include <string>
#include <ctime>
//#include <windows.h>
using namespace std;
void simulatingHack();
int main(){
bool choseGame = false;
string userSentence;
string games[] = {"thermonuclearwar", "tictactoe", "chess"};
clearScreen();
system("bash -c \". line-ringing.sh\"");
std::this_thread::sleep_for(std::chrono::milliseconds(6000));
cout << "LOGON: ";
getline(cin, userSentence);
removeSpacesAndCapitals(userSentence);
if (userSentence == "joshua"){
clearScreen();
simulatingHack();
system("bash -c \". test.sh\"");
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
cout << "\nGREETINGS PROFFESSOR FALKEN. HOW ARE YOU DOING TODAY?" << endl;
getline(cin, userSentence);
}
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
system("bash -c \". playGame.sh\"");
cout << "\nSHALL WE PLAY A GAME?" << endl;
getline(cin, userSentence);
removeSpacesAndCapitals(userSentence);
while (!choseGame){
// find the keyword "thermonuclearwar", "tictactoe", or "chess"
if (userSentence.find(games[0]) != -1){
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
system("bash -c \". excellent.sh\"");
cout << "EXCELLENT." << endl;
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
cout << "LAUNCHING THERMONUCLEAR WAR" << endl;
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
choseGame = true;
ThermonuclearWar game1;
game1.runGame();
}
else if (userSentence.find(games[1]) != -1){
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
system("bash -c \". excellent.sh\"");
cout << "EXCELLENT." << endl;
std::this_thread::sleep_for(std::chrono::milliseconds(1500));
cout << "LAUNCHING TIC TAC TOE" << endl;
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
choseGame = true;
TicTacToe game2;
game2.playGame();
}
else if (userSentence.find(games[2]) != -1){
cout << "Launch CHESS" << endl;
choseGame = true;
//Chess game3;
//game3.runGame();
}
else{
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
cout << "We should play a game I know. Like ThermonuclearWar, Tic Tac Toe, or Chess.\n";
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
getline(cin, userSentence);
removeSpacesAndCapitals(userSentence);
}
}
return 0;
}
void simulatingHack(){
// I need to adjust how it prints in the terminal, also need to add the other screens that are printed
clearScreen();
std::this_thread::sleep_for(std::chrono::milliseconds(550));
system("bash -c \". hack1sound.sh\"");
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
system("bash -c \". hack1.sh\"");
cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
clearScreen();
system("bash -c \". hack2.sh\"");
cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
clearScreen();
system("bash -c \". hack3.sh\"");
cout << "\n\n\n\n\n\n\n\n\n\n\n\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
clearScreen();
system("bash -c \". hack4.sh\"");
cout << "\n\n\n\n\n\n\n\n\n\n\n\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
clearScreen();
system("bash -c \". hack5.sh\"");
cout << "\n\n\n\n\n\n\n\n\n\n\n\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
clearScreen();
system("bash -c \". hack6.sh\"");
cout << "\n\n\n\n\n\n\n\n\n\n\n\n";
clearScreen();
// first screen (at top)
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "045 11456 11809 11893 11972 11315\n" << flush;
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "PRT CON. 3.4.5. SECTION 9.4.3 PORT STAT: SD-345 \n" << flush;
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "\n(311) 835-7385\n" << flush;
std::this_thread::sleep_for(std::chrono::milliseconds(300));
// cout short highlighted block
cout << '\r';
std::this_thread::sleep_for(std::chrono::milliseconds(500));
cout << "NEW!" << flush;
clearScreen();
// second screen (at bottom)
std::this_thread::sleep_for(std::chrono::milliseconds(300));
cout << "(311) 938-3582\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
cout << string(45, '\n');
clearScreen();
// third screen (middle) (type in increments)
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "(311) 757-8739\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "(311) 936-2364\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "- PRT. STRT. CRT. DEF.\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << " ==========================================================\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "F91150: SUSDKJ: SDF JSL: DKSJL: SKFJJ: SDKFJLJ: \n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "SYSPROC FUNCT READY ALT NET READY\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "CPU AUTH RY-345-AX3 SYSCOMP STATUS: ALL PORTS ACTIVE\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "22/34534.90/3209 11CVB-3904-39490\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "(311) 936-2364\n";
// cout << long highlited block
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "(311) 938-3582\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "EE/74534.90/3289 11CVB-3904-39490\n";
clearScreen();
// fourth screen
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "12354-40-49KJ: CONTR PAK\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << "(311) 787-1183\n";
std::this_thread::sleep_for(std::chrono::milliseconds(150));
cout << " FLB: 33.34.543 HPBS: 34/56/67/83/ STATUS FLT 034/384\n";
clearScreen();
//fifth screen
//cout << short highlighted block
//cout << ""
// I want to have this appear very briefly
cout << "H H EEEEE L L OOO W W OOO RRRR L DDDD !!\n"
<< "H H E L L O O W W W O O R R L D D !!\n"
<< "HHHHH EEEEE L L O O W W W O O RRRR L D D !!\n"
<< "H H E L L O O ,, W W O O R R L D D \n"
<< "H H EEEEE LLLLL LLLLL OOO ,, W W OOO R R LLLLL DDDD !!\n";
std::this_thread::sleep_for(std::chrono::milliseconds(300));
clearScreen();
}
//************ copy this line below to run the program in the terminal **************
// g++ -std=c++11 country.h country.cpp thermonuclearWar.h thermonuclearWar.cpp
// Map.h Map.cpp tictactoe.h tictactoe.cpp driver.cpp