-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (34 loc) · 1.26 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
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>A* Pathfinding Algorithim</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div id="startendButton">Place Start & End blocks</div>
<div id="wallButton">Place Wall</div>
<div id="startButton">Find Path</div>
<div id="clearButton">Clear Board</div>
<div id="replay" class="inactive">Play animation</div>
</header>
<div id="board"></div>
</body>
<script type="text/javascript" src="class.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function()
{
let b = document.getElementById("board");
let board = new Board(b);
board.load();
let seb = document.getElementById("startendButton");
let w = document.getElementById("wallButton");
let c = document.getElementById("clearButton");
board.add("startEnd", seb);
board.add("wall", w);
board.add("clear", c);
let s = document.getElementById('startButton');
let astar = new Astar(s, board);
});
</script>
</html>