-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex1.js
61 lines (40 loc) · 1.4 KB
/
index1.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
//listening for click from start button to inititiate start game function
addEventListener('click', function() {
startGame
})
//start game function
const startGame = () => {
console.log("start game")
}
//redirecting to second page from start game button click
document.getElementById("startButton").onclick = function () {
location.href = "www.website.com"
}
//creating elements
const canvas = document.createElement("canvas")
//allows to draw on canvas
const context = canvas.getContext("2d")
//grabbing elements
const game = document.getElementById('canvas')
class date {
constructor()
}
//add button for option1
//add button for option2
//add button for option3
//add EventListener to see what selection user selects (option 1, 2, or 3)
//eventlistener on option 1
addEventListener("click", function() {
}
//eventlistener on option 2
//eventlistener on option 3
//for loop to randomly generate date's "good action" or "bad action" based on user's selection of option 1, option 2, or option 3
//connect specific action with point totals
//have point totals display in two boxes on screen
//go through 10 rounds of user selection
//at end of ten rounds - display game over
//calculate total
//show the user the adventure earned based on point total
//end screen:
//add button to quit
//add button to start over