Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
bb8bc40c13 | |
|
0737ed92a8 | |
|
4f60b29fc4 | |
|
657b97c4a8 |
|
@ -7,7 +7,7 @@ using namespace std;
|
||||||
class Intro {
|
class Intro {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void mainIntro();
|
static void mainIntro();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "intro.h"
|
#include "intro.h"
|
||||||
#include "title.h"
|
#include "title.h"
|
||||||
|
#include <cstdlib>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <cstring>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
class Sleep{
|
class Sleep{
|
||||||
public:
|
public:
|
||||||
void delay(int milliseconds);
|
static void delay(int milliseconds);
|
||||||
|
static void type(string text);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include "include/print.h"
|
||||||
|
#include "include/sleep.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
class Title{
|
class Title{
|
||||||
private:
|
private:
|
||||||
protected:
|
protected:
|
||||||
public:
|
public:
|
||||||
void mainTitle();
|
static void mainTitle();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
#include "include/intro.h"
|
#include "include/intro.h"
|
||||||
|
|
||||||
void Intro::mainIntro(){
|
void Intro::mainIntro(){
|
||||||
cout << "The world didn't end with a bang. It ended with a groan.. and the scratching of death fingers against steel shutters." << endl;
|
int time = 1000;
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(3000));
|
cout << endl;
|
||||||
|
cout << endl;
|
||||||
|
Sleep::type("");
|
||||||
|
Sleep::delay(time);
|
||||||
|
Sleep::type("The world didn't end with a bang. It ended with a groan.. and the scratching of death fingers against steel shutters.");
|
||||||
|
Sleep::delay(time);
|
||||||
|
Sleep::type("Pete used to sell shotgun, slug, and survival tips to deer hunters and doomsday preppers out of his rundown gun store ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#include "include/main.h"
|
#include "include/main.h"
|
||||||
|
|
||||||
int main (){
|
int main (){
|
||||||
Title title;
|
system("clear");
|
||||||
title.mainTitle();
|
Title::mainTitle();
|
||||||
Intro intro;
|
Intro::mainIntro();
|
||||||
intro.mainIntro();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,3 +8,18 @@ void Sleep::delay(int milliseconds){
|
||||||
// Do nothing, just wait
|
// Do nothing, just wait
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void Sleep::type(string text){
|
||||||
|
int a = text.size();
|
||||||
|
char* charArray = new char[a+1];
|
||||||
|
strcpy(charArray, text.c_str());
|
||||||
|
int i = 0;
|
||||||
|
int time = 300;
|
||||||
|
|
||||||
|
while(i < a+1){
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(time));
|
||||||
|
cout << charArray[i] << flush;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
cout << endl;
|
||||||
|
delete[] charArray;
|
||||||
|
}
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
#include "include/title.h"
|
#include "include/title.h"
|
||||||
#include "include/print.h"
|
|
||||||
|
|
||||||
|
|
||||||
void Title::mainTitle(){
|
void Title::mainTitle(){
|
||||||
int s = 2000;
|
int time = 700;
|
||||||
Print print;
|
cout << "███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗" << endl;
|
||||||
print.println("███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝" << endl;
|
||||||
print.println("██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ " << endl;
|
||||||
print.println("███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ ");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ " << endl;
|
||||||
print.println("╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ ");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗" << endl;
|
||||||
print.println("███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗");
|
Sleep::delay(time);
|
||||||
usleep(s);
|
cout << "╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝" << endl;
|
||||||
print.println("╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue