-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
115 lines (109 loc) · 4.21 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
<!DOCTYPE html>
<html lang="es" dir="ltr">
<head>
<meta charset="utf-8">
<title>Chess AI - Alpha Beta</title>
<link rel="icon" href="./icons/logo.png">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
<link rel="stylesheet" href="./style.css">
<script type="text/javascript" src="./js/chess.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/evMatrix.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/behaviour.js" charset="utf-8"></script>
</head>
<body>
<div id="sectioner">
<div id="information-div">
<div id="subinfo-div">
<h1>Chess AI</h1>
<p id="author">Created by Alejandro Medina Reyes</p>
<br/><br/>
</div>
<span id="information">
<p id="turn">Current turn: White</p>
<p id="mobile_w">This is a pc intended experience</p>
<div class="card restart unselectable" id="restart-pc" onclick="restart(false)">
<img src="./icons/robot.png" width="55px" >
<span>Restart, ai start</span>
</div>
<div class="card restart unselectable" id="restart-you" onclick="restart(true)">
<img src="./icons/avatar.png" width="55px">
<span>Restart, you start</span>
</div>
<div class="card restart unselectable" id="restart-you" onclick="restart_local()">
<img src="./icons/local.png" width="55px">
<span>Local multiplayer</span>
</div>
<div class="card restart unselectable" id="moreinfo-button" onclick="toggle_info()">
<img src="./icons/info.png" width="25px">
<span>Show/Hide information</span>
</div>
<div id="difficulty_div">
<label >Difficulty</label>
<input class="slider" type="range" id="difficulty_s" name="volume" min="0" max="6" value="1">
<label id="dif_label">0</label>
</div>
</span>
</div>
<div class="card" id="main-div">
<table id="tablero" class="unselectable" >
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
<tr>
<td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
</tr>
</table>
</div>
<div id="movements-div">
<p id="move_title">Moves:</p>
<div id="moves">
<table >
<tbody id="moveTable">
<tr>
<td width="10%">No.</td>
<td width="25%">Piece</td>
<td width="32.5%">From</td>
<td width="32.5%">To</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card hidden" id="moreinfo-div">
<h2>About Chess AI</h2>
<p>It was created by Alejandro Medina Reyes and uses <a target="_blank" href="https://github.com/jhlywa/chess.js/">chess.js</a> to control the state of the board.
</p>
<p>The difficulty levels are:</p>
<ul>
<li>0:
<p>The algorithm chooses a random move.</p>
</li>
<li>odd numbers:
<p>The algorithm chooses the best move according to the value of the pieces remaining in the n following turns.</p>
</li>
<li>pair numbers:
<p>The algorithm chooses the best move according to the value of the pieces remaining and their positions in the n following turns.</p>
</li>
</ul>
</div>
</div>
</body>
</html>