-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
58 lines (50 loc) · 1.58 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=yes">
<title>Taquin resolver</title>
<script src="./lib/vue.js"></script>
<script src="./assets/app.js"></script>
<link rel="stylesheet" href="./assets/style.css">
<link rel="icon" href="favicon.png">
</head>
<body>
<div id="app-ctnr">
<!-- <div id="depth-bg">
<div id="depth-mask" :style="`--depth-mask-scale:${depthMaxScale.toFixed(2)};`"></div>
</div> -->
<div id="board-ctnr">
<div id="board" :style="`--rows:${board.height}; --columns:${board.width}`">
<div v-for="(p, i) in pieces"
class="piece"
v-bind:class="[p.type]"
:style="`--top:${p.y + 1}; --left:${p.x + 1}; --width:${p.w}; --height:${p.h};`"
>
<!-- <span>{{p.id}}<br>{{p.x}}, {{p.y}}</span> -->
</div>
</div>
<div class="rt-info">
<div v-show="running">
<span>Solved {{solvedCounter}} / {{trialsCounter}}</span>
<!-- <span>{{statesCounter}} States</span> -->
</div>
</div>
</div>
<div id="solve-bar">
<button id="solve-btn" v-on:click="startSolve" :disabled="!!running">SOLVE</button>
</div>
<div class="solutions-ctnr">
<div v-for="(sol, i) in solutions" class="solution">
<span class="moves">{{sol.sequenceLength}} moves</span>
<span>{{sol.duration}}ms</span>
<span>{{sol.round}} steps</span>
<button v-if="i === 0" v-on:click="copySequence" class="copy-btn">📋</button>
</div>
</div>
</div>
<script>
app.$mount('#app-ctnr')
</script>
</body>
</html>