Skip to content

Commit

Permalink
Merge pull request #1 from gamalielhere/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gamalielhere authored Jan 21, 2018
2 parents b956cc3 + 87048ea commit 9a1db88
Show file tree
Hide file tree
Showing 3 changed files with 359 additions and 205 deletions.
42 changes: 32 additions & 10 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,32 @@ body > h1 {
/*BOARD*/
.game {
background-color: #3b3b62;
margin: 0 auto;
display: inline-block;
height: 602px;
width: 602px;
margin: 0 auto;
}

#canvas {
visibility: 0;
border: 2px solid gray;
visibility: hidden;
}

.notification {
display: none;
background-color: black;
color: red;
height: 600px;
width: 600px;
}

/*BUTTONS*/
button {
background-color: grey;
border: 1px solid black;
font-family: "Press Start 2P", Arial, Serif;
margin: 5px;
height: 45px;
width: 300px;
}

.buttons {
float: left;
width: 450px;
.content {
margin-top: 64px;
}

.resume {
Expand All @@ -66,3 +62,29 @@ button {
.pause {
display: none;
}

.mobileButton {
display: none;
}

.mobileButtonCenter {
text-align: center;
}

.mobileButtonCenter button {
width: 80px;
}

.left--right button {
margin: 0 40px;
}

@media screen and (max-width: 960px) {
.mobileButton {
display: block;
}

.content {
margin-top: 25px;
}
}
54 changes: 34 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,43 @@
<link href='https://fonts.googleapis.com/css?family=Press+Start+2P' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" src="//normalize-css.googlecode.com/svn/trunk/normalize.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<meta name="viewport" content="width=device-width" />
<script src="https://cdn.firebase.com/js/client/2.4.0/firebase.js"></script>
</head>
<body>
<div class="buttons">
<button class="playAgain"> PLAY AGAIN!</button>
<button class="home">HOME</button>
<button class="reset">RESET</button>
<button class="start">START</button>
<button class="pause">PAUSE</button>
<button class="resume">RESUME</button>
<h1>HIGHEST SCORE: <span id="highScore"></span> </h1>
</div>
<h1>SNAKE</h1>
<div class="game">
<canvas id="canvas" width="600" height="600">
YOUR BROWSER DOESN'T SUPPORT CANVAS YET
</canvas>
<h1><span class="currentScore">Your score: 0</span></h1>
</div>
<div class="notification">
<h1>YOU DIED!</h1>
<h3 class="score">TOTAL SCORE: </h3>
<div class="content">
<h1>SNAKE</h1>
<h1><span class="currentScore"></span></h1>
<div class="game">
<canvas id="canvas">
YOUR BROWSER DOESN'T SUPPORT CANVAS YET
</canvas>
</div>
<div class="notification">
<h1>YOU DIED!</h1>
<h3 class="score"></h3>
</div>
<div class="buttons">
<button class="playAgain" onclick="playAgain();"> PLAY AGAIN!</button>
<button class="start" onclick="startGame();">START</button>
<div class="mobileButton">
<div class="mobileButtonCenter">
<button onclick="mobileUp();"> UP </button>
</div>
<div class="mobileButtonCenter left--right">
<button onclick="mobileLeft();"> LEFT </button>
<button onclick="mobileRight();"> RIGHT </button>
</div>
<div class="mobileButtonCenter">
<button onclick="mobileDown();"> DOWN </button>
</div>
</div>
<button class="home" onclick="homeButton();">HOME</button>
<button class="reset" onclick="resetGame();">RESET</button>
<button class="pause" onclick="pauseGame();">PAUSE</button>
<button class="resume" onclick="resumeGame();">RESUME</button>
<h1>HIGHSCORE: <span id="highScore"></span> </h1>
</div>
</div>
<audio src="assets/run.mp3" id="run" loop></audio>
<audio src="assets/dying.mp3" id="die"></audio>
Expand Down
Loading

0 comments on commit 9a1db88

Please sign in to comment.