-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmastermind.html
More file actions
72 lines (72 loc) · 2.72 KB
/
mastermind.html
File metadata and controls
72 lines (72 loc) · 2.72 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mastermind Game</title>
<style>
@import "css/bootstrap.css";
</style>
<script src="js/bootstrap.js"></script>
<script src="js/knockout-3.5.1.debug.js"></script>
<script type="text/javascript" src="mastermind.js"></script>
</head>
<body>
<div class="container">
<p/>
<div class="card">
<div class="card-header">
<h3 class="card-title">Mastermind Console</h3>
</div>
<div class="card-body">
<div class="mb-3">
<label class="form-label" for="level">Game level:</label>
<span class="badge bg-success" id="level" data-bind="text: level"></span>
</div>
<div class="mb-3">
<label class="form-label" for="lives">Lives:</label>
<span class="badge bg-success" id="lives" data-bind="text: lives"></span>
</div>
<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="timeLeft">Time left:</label>
<div id="timeLeft" class="progress">
<div class="progress-bar bg-info"
style="width: 100%"
data-bind="style: {'width': progressBarWidth}"></div>
</div>
</div>
<div class="mb-3">
<label class="form-label" for="guess">Guess:</label>
<input type="text" 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 id="tb" class="table table-bordered table-hover table-striped table-responsive">
<thead>
<tr>
<!-- <th>Game Level</th> -->
<th>No</th>
<th>Guess</th>
<th>Message</th>
</tr>
</thead>
<tbody data-bind="foreach: moves">
<tr>
<!-- <td data-bind="text: gameLevel"></td> -->
<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>