-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
89 lines (81 loc) · 2.03 KB
/
main.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
#include "natures.h"
int totalQuestions = rand() % 6 + 8;
int main() {
introduction();
return 0;
}
// In the game, you're asked 8-14 questions, this just makes sure that you are asked that value of questions
void totalQuestionNumChecker() {
break;
if (totalQuestions == player.questionNum) {
getAnswer();
}
else {
player.questionNum += 1;
questionChooser();
}
}
// Clears screen, saves me a LOT of lines in the long run
void hitEnter() {
cin.get();
system("clear");
}
// Function that chooses a random number, which will translate to what question you will get
int questionNum() {
int question = rand() % 4 + 1;
return question;
}
// A word for word introduction, along with clear screens and enter hits, hopefully...
void introduction() {
printf("Welcome!");
hitEnter();
printf("This is a portal that leads\n"
"to the world of Pokemon!");
hitEnter();
printf("But before I can let you through,\n"
"I have several questions for you.");
hitEnter();
printf("I want you to answer them sincerely.");
hitEnter();
printf("Are you ready?");
hitEnter();
printf("\tOk...\n"
"Let the interview begin!");
hitEnter();
questionChooser();
}
// Chooses a random question
void questionChooser() {
system("clear");
// Randomly asks you a question
switch (rand() % 14 + 1) {
case 1:
hardyQuestions();
case 2:
docileQuestions();
case 3:
braveQuestions();
case 4:
jollyQuestions();
case 5:
impishQuestions();
case 6:
naiveQuestions();
case 7:
timidQuestions();
case 8:
hastyQuestions();
case 9:
sassyQuestions();
case 10:
calmQuestions();
case 11:
relaxedQuestions();
case 12:
lonelyQuestions();
case 13:
quirkyQuestions();
case 14:
miscQuestions();
}
}