-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
63 lines (56 loc) · 1.36 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
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Bhumba Board</title>
<style>
body {
font-family: sans-serif;
}
</style>
<script type="module" src="/build/bhumba-board.esm.js"></script>
<script nomodule src="/build/bhumba-board.js"></script>
</head>
<body>
<h1>Bhumba Board</h1>
<h2>Example</h2>
<bhumba-board id="example-board"></bhumba-board>
<script>
const board = document.getElementById("example-board");
board.boardState = {
Height: 7,
Width: 7,
Food: [
{ X: 4, Y: 2 },
{ X: 0, Y: 4 },
{ X: 3, Y: 3 },
],
Snakes: [
{
ID: "p1",
Body: [
{ X: 6, Y: 1 },
{ X: 5, Y: 1 },
{ X: 5, Y: 1 },
],
Health: 99,
EliminatedCause: "",
EliminatedBy: "",
},
{
ID: "p2",
Body: [
{ X: 1, Y: 6 },
{ X: 1, Y: 5 },
{ X: 1, Y: 5 },
],
Health: 99,
EliminatedCause: "",
EliminatedBy: "",
},
],
};
</script>
</body>
</html>