-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgame.html
More file actions
57 lines (56 loc) · 2.08 KB
/
game.html
File metadata and controls
57 lines (56 loc) · 2.08 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Number Guessing Game</title>
<style>
@import "css/bootstrap.css";
</style>
<script src="js/knockout-3.5.1.debug.js"></script>
<script type="text/javascript" src="game.js"></script>
</head>
<body>
<div class="container">
<div class="card">
<div class="card-header">
<h3 class="card-title">Game Console</h3>
</div>
<div class="card-body">
<div class="mb-3">
<label class="form-label" for="tries">Tries:</label>
<span class="badge bg-success"
id="tries"
data-bind="text: tries"></span>
</div>
<div class="mb-3">
<label class="form-label" for="guess">Guess:</label>
<input type="number" min="1" max="100"
class="form-control"
id="guess"
data-bind="value: guess"></input>
<button class="btn btn-success"
data-bind="click: play">Play</button>
</div>
<div class="mb-3">
<table class="table table-bordered table-hover table-striped table-responsive">
<thead>
<tr>
<th>No</th>
<th>Guess</th>
<th>Message</th>
</tr>
</thead>
<tbody data-bind="foreach: moves">
<tr>
<td data-bind="text: $index() + 1"></td>
<td data-bind="text: guess"></td>
<td data-bind="text: message"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>