-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript-init.js
More file actions
31 lines (29 loc) · 1.01 KB
/
javascript-init.js
File metadata and controls
31 lines (29 loc) · 1.01 KB
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
function init()
{
subTotal = 0;
position = 0;
gold = 20;
health = 40;
locations = [
{ name: "Hero Path", description: "A worn path" },
{ name: "King's Castle", description: "An old castle." }
];
buttons = [
{ optionOne: "Continue along the path.", actionOne: "MOVE",
optionTwo: "Stay where you are.", actionTwo: "SHOP"}
];
shopItems = [
{ name: "Potion", cost: 10, description: "A healing liquid." },
];
playerItems = [
{ name: "Sword", description: "An old, rusty sword." }
];
document.getElementById("actionButton").style.visibility = "hidden";
document.getElementById("optionalInfo").style.visibility = "hidden";
document.getElementById("list").style.visibility = "hidden";
document.getElementById("extraHeader").style.visibility = "hidden";
document.getElementById("extraSubHeader").style.visibility = "hidden";
document.getElementById("infoHeader").style.visibility = "hidden";
document.getElementById("list2").style.visibility = "hidden";
loadData(position, locations, buttons, shopItems);
}