-
Notifications
You must be signed in to change notification settings - Fork 0
/
maze.html
46 lines (39 loc) · 883 Bytes
/
maze.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
<!doctype html>
<html>
<head>
<script src="robot.js"></script>
<script src="player.js"></script>
<script src="maze.js"></script>
<script src="maze-space.js"></script>
<script src="ghost.js"></script>
<script src="maze-interface.js"></script>
<script>
var m = new Maze({
width: 10,
height: 10,
startX: 1,
startY: 1,
endX: 10,
endY: 10,
startOrientation: "east"
});
var ghosts = [];
ghosts.push(new Ghost(5, 6, "east", m));
ghosts.push(new Ghost(3, 8, "west", m));
ghosts.push(new Ghost(10, 1, "west", m));
var p = new Player();
p.setMaze(m);
</script>
<script src="level01.js"></script>
<link href="maze.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="maze">
</div>
</body>
<script>
var i = new mazeInterface(m, p, ghosts);
i.render();
i.bindEvents();
</script>
</html>