-
Notifications
You must be signed in to change notification settings - Fork 0
/
BD.cpp
128 lines (105 loc) · 4.63 KB
/
BD.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
#include <iostream>
#include <string>
#include <windows.h>
using namespace std;
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD CursorPosition;
void print_in(int x, int y, string text);
int main(){
/*
These are the words:
FELIZ
CUMPLE
NATHAN
They're stylized in ASCII code
*/
string word[]={
"\xDC\xDB\xDB\xDB\xDB \xDC\xDB\xDB\xDB\xDC \xDB \xDC\xDB \xDC\xDC\xDC\xDC\xDC\xDC ",
"\xDB\xDF \xDF \xDB\xDF \xDF \xDB \xDB\xDB \xDF \xDC\xDC\xDF ",
"\xDB\xDF\xDF \xDB\xDB\xDC\xDC \xDB \xDB\xDB \xDC\xDF\xDF \xDC\xDF",
"\xDB \xDB\xDC \xDC\xDF \xDB\xDB\xDB\xDC \xDF\xDB \xDF\xDF\xDF\xDF\xDF\xDF ",
" \xDB \xDF\xDB\xDB\xDB\xDF \xDF \xDF ",
" \xDF ",
"\xDC\xDB\xDC \xDC \xDB\xDF\xDC\xDF\xDB \xDB \xDC\xDC \xDB \xDC\xDB\xDB\xDB\xDC ",
"\xDB\xDF \xDF\xDC \xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB\xDF \xDF",
"\xDB \xDF \xDB \xDB \xDB \xDC \xDB \xDB\xDF\xDF\xDF \xDB \xDB\xDB\xDC\xDC ",
"\xDB\xDC \xDC\xDF \xDB \xDB \xDB \xDB \xDB \xDB\xDB\xDB\xDC \xDB\xDC \xDC\xDF ",
"\xDF\xDB\xDB\xDB\xDF \xDB\xDC \xDC\xDB \xDB \xDB \xDF \xDF\xDB\xDB\xDB\xDF ",
" \xDF\xDF\xDF \xDF \xDF ",
" \xDC \xDB\xDB \xDC\xDC\xDC\xDC\xDF \xDC \xDB \xDB\xDB \xDC ",
" \xDB \xDB \xDB \xDF\xDF\xDF \xDB \xDB \xDB \xDB \xDB \xDB ",
"\xDB\xDB \xDB \xDB\xDC\xDC\xDB \xDB \xDB\xDB\xDF\xDF\xDB \xDB\xDC\xDC\xDB \xDB\xDB \xDB",
"\xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB \xDB ",
"\xDB \xDB \xDB \xDB \xDF \xDB \xDB \xDB \xDB \xDB",
"\xDB \xDB\xDB \xDB \xDF \xDB \xDB \xDB\xDB",
" \xDF \xDF "
};
string dragon[] = {
" + + ",
" + ++ ",
" ++ ++++++++ +++ ",
" ++++++ ++++++/\\ / \\ +++ ++ ",
" +++ ++++ \\ / \\ ++ + ",
" +++++ / \\ +++ + ",
" +++++ | | | \\ +++ ",
" +++++ | | | +++ ",
" +++++ || | | | +++ ",
" +++++++ / | | | ++++ ",
" ++++++++ | | || +++++ ",
" ++++++++++ | | /++++++ ",
" ++++++++++++++++++++++ ",
" +++++++++++++++++++++ ",
" ++++++++++++++++++++ ",
" ++++++++++++++++++++ ",
" ++++++++++++++++++++ ",
" ++ ++++ +++++ +++++ ",
" ++ ++++ ++ ++++ ",
" ++ +++ + +++ ",
" ++ ++ ++ +++ ",
" ++ ++ ++ ++ "
};
string empty = " ";
string buffer = " ";
string border(56,'\xCD');
string space(56,' ');
int x;
int randomNumber = 0;
// print base canvas
SetConsoleTextAttribute(console, 10);
cout<< "\t\xC9" << border << "\xBB" <<endl;
cout<< "\t\xBA" << space << "\xBA" <<endl;
for ( x = 0; x < 22; x++)
{
cout<< "\t\xBA" << dragon[x] << "\xBA" <<endl;
}
for (x = 0; x < 22; x++)
{
cout<< "\t\xBA" << space << "\xBA" <<endl;
}
cout << "\t\xC8" << border << "\xBC" << endl;
do{
randomNumber = rand()%11;
if(randomNumber <= 2){
SetConsoleTextAttribute(console, 12);
for (x=0;x<19;x++)
{
Sleep(60);
print_in(11,25+x,word[x]);
}
}else{
SetConsoleTextAttribute(console, 10);
for (x=0;x<19;x++)
{
Sleep(60);
print_in(11,25+x,word[x]);
}
}
}while(true);
}
void print_in(int x, int y, string text)
{
CursorPosition.X = x;
CursorPosition.Y = y;
SetConsoleCursorPosition(console,CursorPosition);
cout <<"\t"<< text;
}