Skip to content

Commit

Permalink
Move code in subfolders
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Nov 21, 2012
1 parent ac3ed13 commit 3c5ec96
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 12 deletions.
12 changes: 10 additions & 2 deletions styles.css → css/styles.css
@@ -1,7 +1,10 @@
@import url(http://fonts.googleapis.com/css?family=Lato:100,300);

body { body {
background: #222; background: #222;
color: #fff; color: #fff;
font: 16px Verdana, sans-serif; font: 16px 'Lato', sans-serif;
font-weight: 300;
} }
footer { footer {
text-align: center; text-align: center;
Expand Down Expand Up @@ -30,7 +33,7 @@ a, a:link, a:visited, a:hover {
right: 25px; right: 25px;
top: 5px; top: 5px;
position: absolute; position: absolute;
line-height: 12px; line-height: 20px;
} }
#messages { #messages {
left: 0; left: 0;
Expand All @@ -41,8 +44,13 @@ a, a:link, a:visited, a:hover {
width: 100%; width: 100%;
} }
#messages, #score { #messages, #score {
font-weight: 100;
font-size: 23px;
text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000, 0 0 3px #000; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000, 0 0 3px #000;
} }
#score, #energy-bar {
font-size: 24px;
}
#energy-bar { #energy-bar {
right: 5px; right: 5px;
top: 5px; top: 5px;
Expand Down
16 changes: 8 additions & 8 deletions index.html
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1" /> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link href="styles.css" rel="stylesheet" type="text/css" /> <link href="css/styles.css" rel="stylesheet" type="text/css" />
</head> </head>
<body> <body>
<section id="game"> <section id="game">
Expand All @@ -23,13 +23,13 @@
<p>Split, a game designed and created by <a href="http://seld.be">Jordi Boggiano</a> for the GitHub Game Off 2012 contest.</p> <p>Split, a game designed and created by <a href="http://seld.be">Jordi Boggiano</a> for the GitHub Game Off 2012 contest.</p>
<p>Game sources <a href="https://github.com/Seldaek/split">available on GitHub</a>.</p> <p>Game sources <a href="https://github.com/Seldaek/split">available on GitHub</a>.</p>
</footer> </footer>
<script src="split.js"></script> <script src="js/split.js"></script>
<script src="node.js"></script> <script src="js/node.js"></script>
<script src="block.js"></script> <script src="js/block.js"></script>
<script src="matrix.js"></script> <script src="js/matrix.js"></script>
<script src="trails.js"></script> <script src="js/trails.js"></script>
<script src="energybar.js"></script> <script src="js/energybar.js"></script>
<script src="utils.js"></script> <script src="js/utils.js"></script>
<script> <script>
(function () { (function () {
var game = new Split( var game = new Split(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions split.js → js/split.js
Expand Up @@ -13,7 +13,7 @@ var Split = function (node, trailsNode, energyNode, forceNode, scoreNode, messag
this.messagesNode = messagesNode; this.messagesNode = messagesNode;


if (window.localStorage && !isNaN(parseInt(window.localStorage.getItem('highscore'), 10))) { if (window.localStorage && !isNaN(parseInt(window.localStorage.getItem('highscore'), 10))) {
this.scoreNode.innerHTML = "Highscore: " + window.localStorage.getItem('highscore'); this.scoreNode.innerHTML = "HIGHSCORE " + window.localStorage.getItem('highscore') + " ◊";
} }


this.ctx = node.getContext('2d'); this.ctx = node.getContext('2d');
Expand Down Expand Up @@ -82,7 +82,7 @@ Split.prototype.tick = function () {
// TODO add pause, unpause should check the time elapsed and add that to all the last* vars // TODO add pause, unpause should check the time elapsed and add that to all the last* vars


this.score = this.matrix.y - this.canvas.height; this.score = this.matrix.y - this.canvas.height;
this.scoreNode.innerHTML = 'Score: ' + this.score; this.scoreNode.innerHTML = '' + this.score + ' ◊';


// compute multiplier // compute multiplier
curTick = Date.now(); curTick = Date.now();
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3c5ec96

Please sign in to comment.