-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
132 lines (132 loc) · 5.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>8 Puzzle</title>
<script src="src/main.js" type="module" defer></script>
<link rel="stylesheet" href="index.css">
<link rel="shortcut icon" href="https://dummyimage.com/600x400/000/fff&text=8" type="image/jpg">
</head>
<body>
<main>
<h2>The <span id="puzzle-size">8</span>-puzzle</h2>
<label for="run-bulk-tests">
<input type="checkbox" id="run-bulk-tests" name="run-bulk-tests">
Run bulk tests?
</label>
<section class="content-wrapper" id="bulk-tests" aria-hidden="true">
<h3>Bulk Tests</h3>
<form class="form" id="bulk-tests-form">
<label for="tests-amount">Tests amount:</label>
<input required type="number" name="tests-amount" id="tests-amount">
<label for="bulk-tests-puzzle-size-cols">Puzzle columns:</label>
<input type="range" id="bulk-tests-puzzle-size-cols" name="puzzle-size-cols" value="3" min="3" max="10" list="puzzle-sizes">
<label for="bulk-tests-puzzle-size-rows">Puzzle rows:</label>
<input type="range" id="bulk-tests-puzzle-size-rows" name="puzzle-size-rows" value="3" min="3" max="10" list="puzzle-sizes">
<select
type="text"
id="heuristic-type"
name="heuristic-type"
value="manhattan"
>
<option value="manhattan">Manhattan Distance</option>
<option value="incorrect-cells-count">Invalid placed cells count</option>
</select>
<button type="submit">Run</button>
</form>
<label for="bulk-tests-progress">Progress will appear here:</label>
<progress id="bulk-tests-progress" max="100" value="0"></progress>
<section id="bulk-test-results"></section>
</section>
<section class="content-wrapper">
<form class="form" id="puzzle-form">
<label for="puzzle-size-cols">Puzzle columns:</label>
<input type="range" id="puzzle-size-cols" name="puzzle-size-cols" value="3" min="3" max="10" list="puzzle-sizes">
<label for="puzzle-size-rows">Puzzle rows:</label>
<input type="range" id="puzzle-size-rows" name="puzzle-size-rows" value="3" min="3" max="10" list="puzzle-sizes">
<datalist id="puzzle-sizes">
<option value="3" label="3"></option>
<option value="4" label="4"></option>
<option value="5" label="5"></option>
<option value="6" label="6"></option>
<option value="7" label="7"></option>
<option value="8" label="8"></option>
<option value="9" label="9"></option>
<option value="10" label="10"></option>
</datalist>
<button class="form-submit-button" id="puzzle-form-submit-button" type="submit">Generate</button>
</form>
<section class="puzzles">
<section class="puzzle-wrapper">
<h3>Initial state:</h3>
<form class="form" id="initial-state-form">
<input
id="puzzle-state"
name="puzzle-state"
type="text"
aria-label="Enter initial state"
required
>
<button type="submit">Set state</button>
</form>
<section id="initial-state" class="puzzle"></section>
<button class="puzzle-randomize-button" id="initial-state-randomize-button">
Randomize
</button>
<button class="puzzle-reset-button" id="initial-state-reset-button">
Reset
</button>
</section>
<section class="puzzle-wrapper">
<h3>Target state:</h3>
<form class="form" id="target-state-form">
<input
id="puzzle-state"
name="puzzle-state"
type="text"
aria-label="Enter target state"
required
>
<button type="submit">Set state</button>
</form>
<section id="target-state" class="puzzle"></section>
<button class="puzzle-randomize-button" id="target-state-randomize-button">
Randomize
</button>
<button class="puzzle-reset-button" id="target-state-reset-button">
Reset
</button>
</section>
</section>
<form class="form" id="solve-puzzle-form">
<label for="heuristic-type">Heuristic type:</label>
<select
type="text"
id="heuristic-type"
name="heuristic-type"
value="manhattan"
>
<option value="manhattan">Manhattan Distance</option>
<option value="incorrect-cells-count">Invalid placed cells count</option>
</select>
<label for="minimized-output">
<input type="checkbox" id="minimized-output" name="minimized-output">
Minimize output
</label>
<label for="reversed-steps">
<input type="checkbox" id="reversed-steps" name="reversed-steps">
Reverse steps
</label>
<button class="form-submit-button" id="solve-button" type="submit">Solve</button>
</form>
</section>
<section class="content-wrapper" id="solution-steps-wrapper">
<h4 id="solution-title">Solution steps:</h4>
<section id="solution-steps">
Solution steps will appear here...
</section>
</section>
</main>
</body>
</html>