Listings 16.11 and 16.12 - Running the game
JS Bin
HTML:
<script>
console.log("Loading The Crypt ...");
</script>
<!-- spacer -->
<script src="http://output.jsbin.com/juneqo.js"></script>
<!-- Place constructor -->
<script src="http://output.jsbin.com/vuwave.js"></script>
<!-- Player constructor -->
<script src="http://output.jsbin.com/nonari.js"></script>
<!-- player view -->
<script src="http://output.jsbin.com/zucifu.js"></script>
<!-- place view -->
<script src="http://output.jsbin.com/royine.js"></script>
<!-- message view -->
<script src="http://output.jsbin.com/jatofe.js"></script>
<!-- map data -->
<script src="http://output.jsbin.com/hozefe.js"></script>
<!-- map builder -->
<script src="http://output.jsbin.com/paqihi.js"></script>
<!-- game controller -->
<script src="http://output.jsbin.com/yeqicu.js"></script>
JS:
var playerName = "Jahver";
var map = theCrypt.mapData;
game.init(map, playerName);