22:prev_link: 14_event
33:next_link: 16_canvas
44:load_files: ["code/chapter/15_game.js", "code/game_levels.js"]
5+ :zip: html include=["css/game.css"]
56
67= Project: A Platform Game =
78
@@ -1212,9 +1213,11 @@ This page feeds them to `runGame`, starting an actual game:
12121213----
12131214<link rel="stylesheet" href="css/game.css">
12141215
1215- <script>
1216- runGame(GAME_LEVELS, DOMDisplay);
1217- </script>
1216+ <body>
1217+ <script>
1218+ runGame(GAME_LEVELS, DOMDisplay);
1219+ </script>
1220+ </body>
12181221----
12191222
12201223ifdef::interactive_target[]
@@ -1244,6 +1247,7 @@ ifdef::interactive_target[]
12441247----
12451248<link rel="stylesheet" href="css/game.css">
12461249
1250+ <body>
12471251<script>
12481252 // The old runGame function. Modify it...
12491253 function runGame(plans, Display) {
@@ -1261,6 +1265,7 @@ ifdef::interactive_target[]
12611265 }
12621266 runGame(GAME_LEVELS, DOMDisplay);
12631267</script>
1268+ </body>
12641269----
12651270
12661271endif::interactive_target[]
@@ -1317,6 +1322,7 @@ ifdef::interactive_target[]
13171322----
13181323<link rel="stylesheet" href="css/game.css">
13191324
1325+ <body>
13201326<script>
13211327 // The old runLevel function. Modify this...
13221328 function runLevel(level, Display, andThen) {
@@ -1334,6 +1340,7 @@ ifdef::interactive_target[]
13341340 }
13351341 runGame(GAME_LEVELS, DOMDisplay);
13361342</script>
1343+ </body>
13371344----
13381345
13391346endif::interactive_target[]
0 commit comments