-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
119 lines (99 loc) · 5.82 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Battleship</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.5/css/bootstrap-flex.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="styles/app.css">
<!-- Libraries available to all code (bots included!) -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.1/lodash.min.js"></script>
<!-- Feel free to rename and move the file -->
<!-- be sure to update this reference if you do -->
<script type="text/javascript" src="MyBot.js"></script>
<!-- Core framework scripts -->
<script type="text/javascript" src="scripts/bots/Dumbot.js"></script>
<script type="text/javascript" src="scripts/bots/Randombot.js"></script>
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="scripts/logger.js"></script>
<script type="text/javascript" src="scripts/index.js"></script>
<script type="text/javascript" src="scripts/gameEngine.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="jumbotron slightly-less-jumbo-jumbotron">
<h1 class="display-3">Battleship</h1>
<p class="lead">Two bots enter, (most likely) only one leaves.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="card">
<div class="card-block form form-inline">
<h4 class="card-title">Select Two to Battle!</h4>
<hr />
<div class="form-group">
<label for="player1">Player 1</label>
<select class="form-control" data-hook="player-list player-1"></select>
</div>
<div class="form-group">
<label for="player2">Player 2</label>
<select class="form-control" data-hook="player-list player-2"></select>
</div>
<div class="form-group">
<div class="btn-group" role="group">
<div class="btn btn-primary btn-large" data-hook="run-battle">Run 1 Battle</div>
<div class="btn btn-secondary btn-large" data-hook="run-bulk-battles">Run 1,000 Battles</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row hide" data-hook="results-view-visual">
<div class="col-md-6 bg-faded text-xs-center board-container">
<h5 class="card-title">Player 1 <span class="tag tag-pill tag-success" data-hook="win-player-1"></span></h5>
<div data-hook="board player-1">
</div>
</div>
<div class="col-md-6 bg-faded text-xs-center board-container">
<h5 class="card-title">Player 2 <span class="tag tag-pill tag-success" data-hook="win-player-2"></span></h5>
<div data-hook="board player-2">
</div>
</div>
</div>
<div class="row hide" data-hook="results-view-stats">
<div class="col-md-6 offset-md-3">
<div class="card card-block bg-faded">
<h5>Player 1 Wins <span class="tag tag-pill tag-default float-xs-right" data-hook="win-percentage-player-1">0.00%</span></h5>
</div>
<div class="card card-block bg-faded">
<h5>Player 2 Wins <span class="tag tag-pill tag-default float-xs-right" data-hook="win-percentage-player-2">0.00%</span></h5>
</div>
<div class="card card-block bg-faded">
<h5>Ties <span class="tag tag-pill tag-default float-xs-right" data-hook="tie-percentage">0.00%</span></h5>
</div>
<div class="card card-block bg-faded">
<h5><i class="fa fa-clock-o"></i> <span class="tag tag-pill tag-primary float-xs-right" data-hook="count-seconds">0.00s</span></h5>
</div>
</div>
</div>
</div>
<script type="text/template" data-hook="template-coordinate">
<span class="tag tag-default coordinate" data-hook="x_<%= x %>_y_<%= y %>">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />
</span>
</div>
<!--
Attributions
<div>Icons made by <a href="http://www.flaticon.com/authors/baianat" title="Baianat">Baianat</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
<div>Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
<div>Icons made by <a href="http://www.flaticon.com/authors/roundicons" title="Roundicons">Roundicons</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
-->
</body>
</html>