Compare commits

...
5 Commits
9 changed files with 53 additions and 31 deletions

No files matched your search

+1 -4
View File
@@ -6,9 +6,6 @@ using namespace std;
class Intro { class Intro {
public: public:
static void mainIntro();
void mainIntro();
private:
}; };
+1
View File
@@ -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;
+6 -2
View File
@@ -1,5 +1,7 @@
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <thread>
#include <cstring>
using namespace std; using namespace std;
class Print{ class Print{
@@ -10,7 +12,9 @@ class Print{
~Print(){ ~Print(){
}; };
void printl(string text); static void printl(string text);
void println(string text); static void println(string text);
static void type(string text);
static void blank_line();
}; };
+1 -1
View File
@@ -3,6 +3,6 @@ using namespace std;
class Sleep{ class Sleep{
public: public:
void delay(int milliseconds); static void delay(int milliseconds);
}; };
+1 -3
View File
@@ -3,8 +3,6 @@
using namespace std; using namespace std;
class Title{ class Title{
private:
protected:
public: public:
void mainTitle(); static void mainTitle();
}; };
+2 -2
View File
@@ -1,6 +1,6 @@
#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; Print::blank_line();
std::this_thread::sleep_for(std::chrono::milliseconds(3000)); Print::type("The world didn't end with a bang. It ended with a groan.. and the scratching of death fingers against steel shutters.");
} }
+6 -4
View File
@@ -1,9 +1,11 @@
#include "include/main.h" #include "include/main.h"
int main (){ int main (){
Title title; system("clear");
title.mainTitle(); //Title title;
Intro intro; Title::mainTitle();
intro.mainIntro(); //Intro intro;
Intro::mainIntro();
//cin >> ;
return 0; return 0;
} }
+22 -1
View File
@@ -1,9 +1,30 @@
#include "include/print.h" #include "include/print.h"
void Print::printl(string text){ void Print::printl(string text){
cout << text; cout << text << flush;
} }
void Print::println(string text){ void Print::println(string text){
cout << text << endl; cout << text << endl;
} }
void Print::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;
}
void Print::blank_line(){
cout << endl;
}
+13 -14
View File
@@ -1,21 +1,20 @@
#include "include/title.h" #include "include/title.h"
#include "include/print.h" #include "include/print.h"
#include "include/sleep.h"
void Title::mainTitle(){ void Title::mainTitle(){
int s = 2000; int s = 900;
Print print; Print::println("███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗");
print.println("███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗"); Sleep::delay(s);
usleep(s); Print::println("██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝");
print.println("██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝"); Sleep::delay(s);
usleep(s); Print::println("███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ ");
print.println("███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ "); Sleep::delay(s);
usleep(s); Print::println("╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ ");
print.println("╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ "); Sleep::delay(s);
usleep(s); Print::println("███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗");
print.println("███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗"); Sleep::delay(s);
usleep(s); Print::println("╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝");
print.println("╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝");
} }