forked from CoachJulian/2023TeamEdgeTerm0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConditionalGame.js
119 lines (48 loc) · 1.83 KB
/
ConditionalGame.js
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
/* --------------------------------------------
You've just learned about variables, conditionals.
Just from knowing those two topics, you can do so much!
Let's try to make a simple program that responds to the user.
We're going to recreate the Magic 8 Ball!!!
Never heard of it? That's ok!
You got this!
--------------------------------------------
How a Magic 8 Ball Works:
The user asks a question and vigoriously shakes the ball.
Then the ball will respond with one of twenty responses, chosen at random.
That's pretty simple right?
--------------------------------------------
Part 1:
Print instructions on the screen and
prompt the user to ask a question
Tip: Don't forget to import the readline-sync module!
-------------------------------------------- */
/* --------------------------------------------
Part 2: Next, we need to randomly select a response from 20 options.
Randomly select a number from 0 - 19
Use that to select from the following responses:
0 - It is certain.
1 - It is decidedly so.
2 - Without a doubt.
3 - Yes - definitely.
4 - You may rely on it.
5 - As I see it, yes.
6 - Most likely.
7 - Outlook good.
8 - Yes.
9 - Signs point to yes.
10 - Reply hazy, try again.
11 - Ask again later.
12 - Better not tell you now.
13 - Cannot predict now.
14 - Concentrate and ask again.
15 - Don't count on it.
16 - My reply is no.
17 - My sources say no.
18 - Outlook not so good.
19 - Very doubtful.
Look up Math.random to see how you can use it to select a random number.
-------------------------------------------- */
/* --------------------------------------------
Part 3: Customize it!
Select your own theme and use case and modify your code!
-------------------------------------------- */