-
Notifications
You must be signed in to change notification settings - Fork 65
/
appearance.c
121 lines (109 loc) · 3.58 KB
/
appearance.c
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
// In this code, we have just skins and functions to clear those skins
#include <ncurses.h>
void dinasour1(int y, int x) {
mvprintw(y-4, x, " e-e ");
mvprintw(y-3, x, " /(\\_/)");
mvprintw(y-2, x, ",___.--` /'-` ");
mvprintw(y-1, x, " '-._, )/'");
mvprintw(y, x, " \\/");
}
void dinasour2(int y, int x) {
mvprintw(y-4, x, " e-e ");
mvprintw(y-3, x, " /(\\_/)");
mvprintw(y-2, x, ",___.--` /'-` ");
mvprintw(y-1, x, " '-._, )/'");
mvprintw(y, x, " /\\");
}
void cactus1(int y, int x) {
mvprintw(y-5, x, " _ ");
mvprintw(y-4, x, " _ ( ) ");
mvprintw(y-3, x, "( \\| | _");
mvprintw(y-2, x, " \\,. |/ )");
mvprintw(y-1, x, " | /'");
mvprintw(y, x, " | |");
}
void cactus2(int y, int x) {
init_pair(5,COLOR_GREEN,COLOR_BLACK);
attron(COLOR_PAIR(5));
mvprintw(y-6, x, " _");
mvprintw(y-5, x, " ( ) _");
mvprintw(y-4, x, " _| |/ )");
mvprintw(y-3, x, " ( \\ /'");
mvprintw(y-2, x, " \\ |");
mvprintw(y-1, x, " | |");
mvprintw(y, x, " | |");
attroff(COLOR_PAIR(5));
}
void sun(int y, int x) {
mvprintw(y-8, x, " ; : ;");
mvprintw(y-7, x, " . \\_,!,_/ ,");
mvprintw(y-6, x, " `.,' `.,'");
mvprintw(y-5, x, " / \\");
mvprintw(y-4, x, "~ -- : : -- ~");
mvprintw(y-3, x, " \\ /");
mvprintw(y-2, x, " ,'`._ _.'`.");
mvprintw(y-1, x, " ' / `!` \\ `");
mvprintw(y, x, " ; : ;");
}
void moon(int y, int x) {
mvprintw(y-6, x, " _.._");
mvprintw(y-5, x, " .' .-'`");
mvprintw(y-4, x, "/ /");
mvprintw(y-3, x, "| |");
mvprintw(y-2, x, "\\ \\");
mvprintw(y-1, x, " '._'-._");
mvprintw(y, x, " ```");
}
void showLoss(int y, int x) {
mvprintw(y-6, x-15, "88");
mvprintw(y-5, x-15, "88");
mvprintw(y-4, x-15, "88");
mvprintw(y-3, x-15, "88 ,adPPYba, ,adPPYba, ,adPPYba,");
mvprintw(y-2, x-15, "88 a8\" \"8a I8[ \"\" I8[ \"\"");
mvprintw(y-1, x-15, "88 8b d8 `\"Y8ba, `\"Y8ba, ");
mvprintw(y, x-15, "88 \"8a, ,a8\" aa ]8I aa ]8I");
mvprintw(y+1, x-15, "88 `\"YbbdP\"\' `\"YbbdP\"\' `\"YbbdP\"\'");
mvprintw(y+3, x-15, "Press 'r' to play again!");
mvprintw(y+4, x-15, "Or 'q' to exit from game.");
}
void showTrex(int x, int y) {
mvprintw(x-7, y-25, " ,d");
mvprintw(x-6, y-25, " 88");
mvprintw(x-5, y-25, "MM88MMM 8b,dPPYba, ,adPPYba, 8b, ,d8");
mvprintw(x-4, y-25, " 88 88P\' \"Y8 a8P_____88 `Y8, ,8P\' ");
mvprintw(x-3, y-25, " 88 88 8PP\"\"\"\"\"\"\" )888( ");
mvprintw(x-2, y-25, " 88, 88 \"8b, ,aa ,d8\" \"8b, ");
mvprintw(x-1, y-25, " \"Y888 88 `\"Ybbd8\"' 8P\' `Y8");
}
void clearCactus1(int y, int x) {
mvprintw(y-6, x+7, " ");
mvprintw(y-5, x+8, " ");
mvprintw(y-4, x+9, " ");
mvprintw(y-3, x+8, " ");
mvprintw(y-2, x+9, " ");
mvprintw(y-1, x+9, " ");
mvprintw(y, x+9, " ");
if (x <= 10) {
mvprintw(y-6, 0, " ");
mvprintw(y-5, 0, " ");
mvprintw(y-4, 0, " ");
mvprintw(y-3, 0, " ");
mvprintw(y-2, 0, " ");
mvprintw(y-1, 0, " ");
mvprintw(y, 0, " ");
}
}
void clearDinasourDown(int diY, int diX) {
mvprintw(diY+3, diX+10, " ");
mvprintw(diY+4, diX+8, " ");
mvprintw(diY+5, diX, " ");
mvprintw(diY+6, diX, " ");
mvprintw(diY+7, diX, " ");
}
void clearDinasourUp(int diY, int diX) {
mvprintw(diY-7, diX+4, " ");
mvprintw(diY-8, diX+1, " ");
mvprintw(diY-9, diX, " ");
mvprintw(diY-10, diX, " ");
mvprintw(diY-11, diX+8, " ");
}