From 0737ed92a83ffd8f9626cd7883db9c9a28f676d3 Mon Sep 17 00:00:00 2001 From: Justin Date: Sat, 10 May 2025 23:54:16 -0500 Subject: [PATCH] Changed the items to static that was need to be. --- src/include/intro.h | 2 +- src/include/main.h | 1 + src/include/sleep.h | 4 ++-- src/include/title.h | 2 +- src/intro.cpp | 12 +++++++----- src/main.cpp | 7 +++---- src/title.cpp | 11 +++++------ 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/include/intro.h b/src/include/intro.h index 4a2577f..85d8ccf 100644 --- a/src/include/intro.h +++ b/src/include/intro.h @@ -7,7 +7,7 @@ using namespace std; class Intro { public: - void mainIntro(); + static void mainIntro(); private: }; diff --git a/src/include/main.h b/src/include/main.h index 9633418..bac4dbc 100644 --- a/src/include/main.h +++ b/src/include/main.h @@ -1,4 +1,5 @@ #include #include "intro.h" #include "title.h" +#include using namespace std; diff --git a/src/include/sleep.h b/src/include/sleep.h index dceb881..f9ce23b 100644 --- a/src/include/sleep.h +++ b/src/include/sleep.h @@ -8,6 +8,6 @@ using namespace std; class Sleep{ public: - void delay(int milliseconds); - void type(string text); + static void delay(int milliseconds); + static void type(string text); }; diff --git a/src/include/title.h b/src/include/title.h index f7673e2..6f93c9f 100644 --- a/src/include/title.h +++ b/src/include/title.h @@ -6,5 +6,5 @@ class Title{ private: protected: public: - void mainTitle(); + static void mainTitle(); }; diff --git a/src/intro.cpp b/src/intro.cpp index 7110112..05327fd 100644 --- a/src/intro.cpp +++ b/src/intro.cpp @@ -1,10 +1,12 @@ #include "include/intro.h" void Intro::mainIntro(){ - Sleep sleep; int time = 1000; - 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 "); + 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 "); } diff --git a/src/main.cpp b/src/main.cpp index f72a8c7..1e66ade 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,8 @@ #include "include/main.h" int main (){ - Title title; - title.mainTitle(); - Intro intro; - intro.mainIntro(); + system("clear"); + Title::mainTitle(); + Intro::mainIntro(); return 0; } diff --git a/src/title.cpp b/src/title.cpp index bcabf89..c0e409c 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -3,18 +3,17 @@ #include "include/sleep.h" void Title::mainTitle(){ - Sleep sleep; int time = 700; cout << "███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗" << endl; - sleep.delay(time); + Sleep::delay(time); cout << "██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝" << endl; - sleep.delay(time); + Sleep::delay(time); cout << "███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ " << endl; - sleep.delay(time); + Sleep::delay(time); cout << "╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ " << endl; - sleep.delay(time); + Sleep::delay(time); cout << "███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗" << endl; - sleep.delay(time); + Sleep::delay(time); cout << "╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝" << endl; }