-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
61 lines (59 loc) · 3.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
59
60
61
<!DOCTYPE html>
<html>
<head>
<title>Jogos-dos-8</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
#loadingIndicator {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
z-index: 999;
text-align: center;
}
#loadingIndicator p {
font-size: 24px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
<script type="text/javascript" src="src/puzzle.js"></script>
<script type="text/javascript" src="src/random_moves.js"></script>
<script type="text/javascript" src="src/firstEuristic.js"></script>
<script type="text/javascript" src="src/secondEuristic.js"></script>
</head>
<body>
<center>
<br />
<br />
<div id="puzzle">
<button id="b0" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;"> </button>
<button id="b1" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">1</button>
<button id="b2" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">2</button><br />
<button id="b3" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">3</button>
<button id="b4" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">4</button>
<button id="b5" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">5</button><br />
<button id="b6" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">6</button>
<button id="b7" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">7</button>
<button id="b8" class="btn btn-default" onclick="pushed(this.id)" style="width:100px; height:100px; font-size: 30px; color:#3377CC;">8</button>
</div>
<br />
<button class="btn btn-default" style="width:200px; height:50px; font-size: 20px; color:#3377CC;" onclick="randomNumber()">Randomizar</button>
<!-- <br /><br /> -->
<button class="btn btn-default" style="width:200px; height:50px; font-size: 20px; color:#3377CC;" onclick="startPuzzle()">Solução Aleatória</button>
<span id="moveCounter" style="font-size: 16px; margin-left: 10px;">Movimentos: 0</span>
<br /><br />
<button class="btn btn-default" style="width:200px; height:50px; font-size: 20px; color:#3377CC;" onclick="solveWithGreedyHeuristic()">Melhores filhos</button>
<span id="moveCounterGreedy" style="font-size: 16px; margin-left: 10px;">Movimentos: 0</span>
<!-- <br /><br /> -->
<button class="btn btn-default" style="width:200px; height:50px; font-size: 20px; color:#3377CC;" onclick="solveWithGreedyHeuristic2()">Melhores netos</button>
<span id="moveCounterGreedy2" style="font-size: 16px; margin-left: 10px;">Movimentos: 0</span>
</center>
</body>
</html>