Skip to content

Commit

Permalink
move scripts to bottom of body
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielecirulli committed Mar 11, 2014
1 parent 2e5ab78 commit 53b0bd2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@

<link href="style/main.css" rel="stylesheet" type="text/css">

<script src="js/hammer.min.js"></script>
<script src="js/keyboard_input_manager.js"></script>
<script src="js/html_actuator.js"></script>
<script src="js/grid.js"></script>
<script src="js/tile.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no">
Expand Down Expand Up @@ -74,5 +66,13 @@ <h1 class="title">2048</h1>
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
</p>
</div>

<script src="js/hammer.min.js"></script>
<script src="js/keyboard_input_manager.js"></script>
<script src="js/html_actuator.js"></script>
<script src="js/grid.js"></script>
<script src="js/tile.js"></script>
<script src="js/game_manager.js"></script>
<script src="js/application.js"></script>
</body>
</html>
8 changes: 3 additions & 5 deletions js/application.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
document.addEventListener("DOMContentLoaded", function () {
// Wait till the browser is ready to render the game (avoids glitches)
window.requestAnimationFrame(function () {
var manager = new GameManager(4, KeyboardInputManager, HTMLActuator);
});
// Wait till the browser is ready to render the game (avoids glitches)
window.requestAnimationFrame(function () {
var manager = new GameManager(4, KeyboardInputManager, HTMLActuator);
});

0 comments on commit 53b0bd2

Please sign in to comment.