Compare commits

...

4 Commits

Author SHA1 Message Date
Justin f0daf29917 Changed the print to static 2025-05-11 10:43:37 -05:00
Justin 5855b37c6e Added the type in to the print 2025-05-11 10:39:58 -05:00
Justin b7ad0fbb6c Added clear screen to the main before its starts. 2025-05-11 10:27:25 -05:00
Justin 1673e995a6 Working on the delay and fixing issues 2025-05-11 10:24:48 -05:00
6 changed files with 40 additions and 19 deletions

View File

@ -1,4 +1,5 @@
#include <iostream>
#include "intro.h"
#include "title.h"
#include <cstdlib>
using namespace std;

View File

@ -1,5 +1,7 @@
#include <iostream>
#include <string>
#include <thread>
#include <cstring>
using namespace std;
class Print{
@ -10,7 +12,8 @@ class Print{
~Print(){
};
void printl(string text);
void println(string text);
static void printl(string text);
static void println(string text);
static void type(string text);
};

View File

@ -3,6 +3,6 @@ using namespace std;
class Sleep{
public:
void delay(int milliseconds);
static void delay(int milliseconds);
};

View File

@ -1,6 +1,7 @@
#include "include/main.h"
int main (){
system("clear");
Title title;
title.mainTitle();
Intro intro;

View File

@ -1,9 +1,26 @@
#include "include/print.h"
void Print::printl(string text){
cout << text;
cout << text << flush;
}
void Print::println(string text){
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;
}

View File

@ -1,21 +1,20 @@
#include "include/title.h"
#include "include/print.h"
#include "include/sleep.h"
void Title::mainTitle(){
int s = 2000;
Print print;
print.println("███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗");
usleep(s);
print.println("██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝");
usleep(s);
print.println("███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ ");
usleep(s);
print.println("╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ ");
usleep(s);
print.println("███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗");
usleep(s);
print.println("╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝");
int s = 900;
Print::println("███████╗██╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███████╗████████╗███████╗");
Sleep::delay(s);
Print::println("██╔════╝██║ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║████╗ ██║ ██╔══██╗██╔════╝╚══██╔══╝██╔════╝");
Sleep::delay(s);
Print::println("███████╗███████║██║ ██║ ██║ ██║ ███╗██║ ██║██╔██╗ ██║ ██████╔╝█████╗ ██║ █████╗ ");
Sleep::delay(s);
Print::println("╚════██║██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██║╚██╗██║ ██╔═══╝ ██╔══╝ ██║ ██╔══╝ ");
Sleep::delay(s);
Print::println("███████║██║ ██║╚██████╔╝ ██║ ╚██████╔╝╚██████╔╝██║ ╚████║ ██║ ███████╗ ██║ ███████╗");
Sleep::delay(s);
Print::println("╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝");
}