-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
104 lines (92 loc) · 2.99 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>die gambling</title>
<!-- styles -->
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/underscore@1.13.2/underscore-umd-min.js"> </script>
<link href="https://fonts.googleapis.com/css2?family=Fredericka+the+Great&display=swap" rel="stylesheet">
<link rel="icon" href="https://images.emojiterra.com/google/android-12l/512px/1f3b2.png">
</head>
<body class="text-center">
<!-- game title -->
<h1 class="p-5"> 🎲 DIE GAMBLING 🎲 </h1>
<!-- feedback -->
<h1 id="rollFeedback"></h1>
<br>
<!-- autogen'd -->
<!-- dice image -->
<main>
<!-- TABLE explaining the gain/loss rule -->
<div id="table">
<table>
<tr id="table-header">
<td><strong>SIDES</strong></td>
<td><strong>GAIN/LOSS</strong></td>
</tr>
<tr class="table-row">
<td class="col1">1</td>
<td>100% loss</td>
</tr>
<tr class="table-row">
<td class="col1">2</td>
<td>60% loss</td>
</tr>
<tr class="table-row">
<td class="col1">3</td>
<td>20% loss</td>
</tr>
<tr class="table-row">
<td class="col1">4</td>
<td id=gain1>20% gain</td>
</tr>
<tr class="table-row">
<td class="col1">5</td>
<td id=gain2>60% gain</td>
</tr>
<tr class="table-row">
<td class="col1">6</td>
<td id=gain3>100% gain</td>
</tr>
</table>
</div>
</main>
<div>
<!-- picture of dice -->
<br>
<p class="info">type an amount and roll on it</p>
<p class="info">reach $1000 to win the game!</p>
<br>
<img id="dicepicture" src='img/die.png' alt='dice'>
<br><br>
<!-- betting section -->
<t>bet: </t>
<input id="bet" type="number">
<button class="btn btn-outline-primary" id="roll"> roll </button>
<button class="btn btn-outline-primary" id="refreshbutton"> refresh </button>
<br><br>
<!-- scores -->
<h1 style="font-size:larger; display:inline">money: $</h1>
<h2 id="money" class="text-info" style="display:inline">20.00</h2>
<t id="gainloss_text"></t>
<h3>total rolls: </h3>
<h2 id="totalAttempts">0</h2>
</div>
<!-- shop area -->
<h1 class="p-5">
<p id="ttshop">SHOP (one-time purchases)</p>
<!-- item 1 -->
<input id="shop1" type="button" value="$50" class="btn btn-danger shopb" onClick="shopped1()">
<t id="tshop1" class="tshop">add an extra side4 to your die</t>
<br>
<!-- item 2 -->
<input id="shop2" type="button" value="$69" class="btn btn-danger shopb" onClick="shopped2()">
<t id="tshop2" class="tshop">add an extra 6.9% to your gains</t>
<br><br>
</h1>
<script src="js/script.js"></script>
</body>
</html>