-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
152 lines (142 loc) · 6.39 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ultimate Tic-Tac-Toe</title>
<!-- BootStrap -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="d-flex justify-content-center">
<div class="wrapper text-center">
<div>
<h1 class="mb-3 mt-4">Ultimate Tic-Tac-Toe</h1>
<canvas id="main-canvas" width="480px" height="480px">
Your browser does not support canvas.
</canvas>
</div>
<div>
<button class="btn btn-dark mt-5 mb-3" type="button" data-bs-toggle="collapse"
data-bs-target="#config">
Config
</button>
<div class="collapse multi-collapse" id="config">
<div class="card card-body">
<form>
<div class="row mb-4">
<div class="col-md-6">
<label class="form-label">Player X</label>
<br>
<!-- Select player cross -->
<div class="btn-group-vertical player-select">
<input type="radio" class="btn-check" name="radio-player-x"
id="radio-human-x" autocomplete="off" checked>
<label class="btn btn-outline-secondary"
for="radio-human-x">
Human
</label>
<input type="radio" class="btn-check" name="radio-player-x"
id="radio-ai-easy-x" autocomplete="off">
<label class="btn btn-outline-secondary"
for="radio-ai-easy-x">
AI Easy
<br>
<small>(random moves)</small>
</label>
<input type="radio" class="btn-check" name="radio-player-x"
id="radio-ai-medium-x" autocomplete="off">
<label class="btn btn-outline-secondary"
for="radio-ai-medium-x">
AI Medium
<br>
<small>(smart random feedback)</small>
</label>
<input type="radio" class="btn-check" name="radio-player-x"
id="radio-ai-hard-x" autocomplete="off">
<label class="btn btn-outline-secondary"
for="radio-ai-hard-x">
AI Hard
<br>
<small>(MCTS with UCT)</small>
</label>
</div>
</div>
<div class="col">
<label class="form-label">Player O</label>
<br>
<!-- Select player nought -->
<div class="btn-group-vertical player-select">
<input type="radio" class="btn-check" name="radio-player-o"
id="radio-human-o" autocomplete="off" checked>
<label class="btn btn-outline-secondary"
for="radio-human-o">
Human
</label>
<input type="radio" class="btn-check" name="radio-player-o"
id="radio-ai-easy-o" autocomplete="off">
<label class="btn btn-outline-secondary"
for="radio-ai-easy-o">
AI Easy
<br>
<small>(random moves)</small>
</label>
<input type="radio" class="btn-check" name="radio-player-o"
id="radio-ai-medium-o" autocomplete="off">
<label class="btn btn-outline-secondary"
for="radio-ai-medium-o">
AI Medium
<br>
<small>(smart random feedback)</small>
</label>
<input type="radio" class="btn-check" name="radio-player-o"
id="radio-ai-hard-o" autocomplete="off">
<label class="btn btn-outline-secondary"
for="radio-ai-hard-o">
AI Hard
<br>
<small>(MCTS with UCT)</small>
</label>
</div>
</div>
</div>
<button type="button" class="btn btn-dark" id="config-button">
New Game
</button>
</form>
</div>
</div>
</div>
</div>
</main>
<!-- BootStrap -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- Model -->
<script src="dist/src/model/util/markType.js"></script>
<script src="dist/src/model/util/types.js"></script>
<script src="dist/src/model/util/moveWithPlayouts.js"></script>
<script src="dist/src/model/util/treeNode.js"></script>
<script src="dist/src/model/cell/cell.js"></script>
<script src="dist/src/model/board/boardStatus.js"></script>
<script src="dist/src/model/board/board.js"></script>
<script src="dist/src/model/cell/localCell.js"></script>
<script src="dist/src/model/board/localBoard.js"></script>
<script src="dist/src/model/board/globalBoard.js"></script>
<script src="dist/src/model/player/player.js"></script>
<script src="dist/src/model/player/playerHuman.js"></script>
<script src="dist/src/model/player/playerAI.js"></script>
<script src="dist/src/model/player/playerAIRandom.js"></script>
<script src="dist/src/model/player/playerAISmartRandomFeedback.js"></script>
<script src="dist/src/model/player/playerAIMCTS.js"></script>
<script src="dist/src/model/game.js"></script>
<!-- GUI -->
<script src="dist/src/gui/img.js"></script>
<script src="dist/src/gui/GUIData.js"></script>
<script src="dist/src/gui/GUI.js"></script>
<!-- Tests -->
<script src="dist/test/test.js"></script>
<!-- App -->
<script src="dist/src/app.js"></script>
</body>
</html>