Skip to content

Commit

Permalink
Stopping point
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Dec 25, 2018
1 parent 3ef0fd2 commit 043b2a4
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 165 deletions.
106 changes: 97 additions & 9 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,104 @@
/*BODY STUFFS*/
body {
text-align: center;
font-family: "Press Start 2P", Arial, Serif;
height: 100%;
margin: 0 !important;
position: relative;
text-align: center;
width: 100%;
}

.initial-text {
border: 1px dashed #fafafa;
color: #fafafa;
display: flex;
flex-direction: column;
margin: auto;
left: 35%;
padding: 30px;
position: absolute;
top: 20%;
right: 35%;
}

.initial-text > .initial-buttons {
align-items: center;
display: flex;
flex-direction: column;
justify-content: space-around;
}

.initial-text > .initial-buttons * {
background-color: rgba(0, 0, 0, 0);
border: 1px solid #fafafa;
border-radius: 5px;
color: inherit;
cursor: pointer;
font-family: inherit;
padding: 15px;
width: 175px;
}

.initial-text > .initial-buttons *:hover {
background-color: #fafafa;
box-shadow: 2px 2px 2px #bcbaba;
color: #0e0e0e;
}

.initial-text > .initial-buttons > .controls,
.initial-text > .initial-buttons > .continue {
margin: 15px 0;
}

.controls-info,
.highscores-container {
display: none;
text-align: left;
}

.back,
.reset,
.continue {
display: none;
}

.back {
margin-bottom: 20px;
}

.header {
background-color: #0e0e0e;
height: 79px;
}
body > h1 {

.header-content {
align-items: center;
border-bottom: 1px solid #fafafa;
display: none;
justify-content: space-between;
padding: 0 10px;
}

.header-content > h2 {
color: #fafafa;
}

.header-content > .score {
color: #39b513;
}

.header-content > .timer {
color: #f94343;
}

/* body > h1 {
margin-top: -5px;
margin-bottom: -3px;
}
} */

/*BOARD*/
.game {
background-color: #3b3b62;
background-color: #0e0e0e;
display: inline-block;
margin: 0 auto;
}
Expand All @@ -21,14 +109,14 @@ body > h1 {

.notification {
display: none;
background-color: black;
background-color: #0e0e0e;
color: red;
}

/*BUTTONS*/
button {
/* button {
background-color: grey;
border: 1px solid black;
border: 1px solid #0e0e0e;
font-family: "Press Start 2P", Arial, Serif;
margin: 5px;
height: 45px;
Expand All @@ -37,7 +125,7 @@ button {
.content {
margin-top: 64px;
}
} */

.resume {
display: none;
Expand Down Expand Up @@ -75,7 +163,7 @@ button {
width: 80px;
}

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

Expand Down
59 changes: 30 additions & 29 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,46 @@
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" src="//normalize-css.googlecode.com/svn/trunk/normalize.css" />
<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="content">
<div class="header">
<div class="header-content" id="header">
<h2>SNAKE</h2>
<div class="score">
Current Score: <span id="currentScore">0</span>
</div>
<div id="bonusFoodTimer"></div>
</div>
</div>
<div class="initial-text" id="infoContainer">
<h1>SNAKE</h1>
<h1><span class="currentScore"></span></h1>
<div class="initial-buttons">
<button class="reset" id="reset"> RESET </button>
<button class="start" id="start"> START </button>
<button class="controls" id="controls"> CONTROLS </button>
<button class="continue" id="continue"> CONTINUE </button>
<button class="back" id="back"> BACK </button>
</div>
<div id="controlsInfo" class="controls-info">
<div>W = Up</div>
<div>S = Down</div>
<div>A = Left</div>
<div>D = Right</div>
<div>SPACEBAR = Start/Pause</div>
</div>
<div id="scoresInfo" class="controls-info">

</div>
</div>
<div class="content">
<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>
<script src="js/script.js"></script>
<script src="js/main.js"></script>
</body>

</html>
Empty file added js/controls.js
Empty file.
Loading

0 comments on commit 043b2a4

Please sign in to comment.