-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsleuth.html
47 lines (46 loc) · 1.45 KB
/
sleuth.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
<!-- Code copyright Ben Collier 2013, Concept copyright Eric N. Miller -->
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="crafty.js"></script>
<script src="https://connect.facebook.net/en_US/all.js"></script>
<script src="ajax.js"></script>
<script src="components.js"></script>
<script src="game.js"></script>
<link rel="stylesheet" href="sleuth.css">
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
var customCharacters = [
[urlParams.get('1_1'), urlParams.get('1_2')],
[urlParams.get('2_1'), urlParams.get('2_2')],
[urlParams.get('3_1'), urlParams.get('3_2')],
[urlParams.get('4_1'), urlParams.get('4_2')],
[urlParams.get('5_1'), urlParams.get('5_2')],
[urlParams.get('6_1'), urlParams.get('6_2')],
[urlParams.get('7_1'), urlParams.get('7_2')],
[urlParams.get('8_1'), urlParams.get('8_2')],
]
function startGame() {
Game.start(customCharacters)
}
window.addEventListener('load', startGame);
</script>
</head>
<body>
<div id="game">
<div id="cr-stage"></div>
<div id="dialogue">
It is a dark and stormy night. A murder is being committed.
</div>
<script>
sendMessage('Game has started!');
sendMessage('Game has started!');
</script>
<div id="commands">
> _
</div>
</div>
</body>
</html>