-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (34 loc) · 1.41 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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>c3ann</title>
<meta name="description" content="Artificial Neural Network">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.css" />
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<canvas id="env" style="float:left;margin:20px;"> </canvas>
<canvas id="network" width="600" height="5000" style="float:left;margin:20px;border:1px solid gray"> </canvas>
<div id="input" style="float:left;margin:20px;"> input </div>
<div id="stats" style="float:left;margin:20px;"> test </div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="js/main.js"></script>
<script>
game = new Game(10, 10, 50, 50);
game.start();
//key options
window.onkeydown = function (event) {
var char = String.fromCharCode(event.keyCode);
if (char.toUpperCase() === "F") {
game.resetBoard = 1;
}
if (char.toUpperCase() === "T") {
game.train();
}
};
</script>
</body>
</html>