Skip to content

Commit

Permalink
Removed console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mpowalisz committed Mar 15, 2019
1 parent e07f82a commit a961358
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 122 deletions.
159 changes: 78 additions & 81 deletions assets/css/style.css
Original file line number Diff line number Diff line change
@@ -1,102 +1,99 @@
body {
background: black;
color: white;
margin: 20px;
width: 95%;

background: black;
color: white;
margin: 20px;
width: 95%;
}

#letter {
color: red;
color: red;
}

#theHook {
margin-left:100px;
#main {
margin-left: 100px;
}

article {
margin-left:200px;
margin-left: 200px;
}

.footer {
border-top: dotted 3px gray;
position: absolute;
bottom: 0;
width: 95%;
height: 100px;
padding-top: 15px;
background-color: black;
border-top: dotted 3px gray;
bottom: 0;
width: 100%;
height: 100px;
padding-top: 15px;
background-color: black;
}

audio {
float: left;
float: left;
}

@media only screen and (max-width:980px) {
body {
width: 700px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
width: 700px;
margin: auto;
}
@media only screen and (max-width: 980px) {
body {
width: 700px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
width: 700px;
margin: auto;
}
}
@media only screen and (max-width:768px) {
body {
width: 640px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
width: 640px;
margin: auto;
}

@media only screen and (max-width: 768px) {
body {
width: 640px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
width: 640px;
margin: auto;
}
}
@media only screen and (max-width:640px) {
body {
width: 500px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
text-align: center;
width: 500px;
height: 70px;
}
audio {
padding-top:10px;
position:absolute;
bottom:0;
left:0;
}

@media only screen and (max-width: 640px) {
body {
width: 500px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
text-align: center;
width: 500px;
height: 70px;
}
audio {
padding-top: 10px;
position: absolute;
bottom: 0;
left: 0;
}
}

@media only screen and (max-width:500px) {
body {
width: 350px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
width: 350px;

}
audio {
padding-top:10px;
position:absolute;
bottom:0;
left:0;
}
}
@media only screen and (max-width: 500px) {
body {
width: 350px;
margin: 10 10 10 20px;
}
.article {
width: 100%;
}
.footer {
width: 350px;
}
audio {
padding-top: 10px;
position: absolute;
bottom: 0;
left: 0;
}
}
7 changes: 0 additions & 7 deletions assets/javascript/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,26 @@ if (confirmPsychic) {
location.reload();
}

// alert("Is there a chance you have powers of the supernatural?");
// alert("See if you can guess which letter the computer is thinking of.");

// Setup event function for key press
document.onkeyup = function(event) {
var userGuess = event.key;

var computerGuess =
computerChoices[Math.floor(Math.random() * computerChoices.length)];

console.log(userGuess); //This is to log the key press

// Checks to insure that the userGuess is in the array of letters.
if (computerChoices.includes(userGuess)) {
// If the user guess matches computer guess, you must have ESP
if (userGuess === computerGuess) {
wins++;
guessArray.push(userGuess);
chances--;
console.log("Wins: " + wins);
}
// If the user guess doesn't match, don't quit your day job
else if (userGuess !== computerGuess) {
losses++;
guessArray.push(userGuess);
chances--;
console.log("Losses: " + losses);
}
// Chances = 0
if (chances === 0) {
Expand Down
57 changes: 23 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"
></script>

<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"
></script>

<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
Expand All @@ -41,42 +43,29 @@
</head>

<body>
<!--
<audio src="music/twilight-zone-song.mp3" autoplay loop>
<p>If you are reading this, it is because your browser does not support the audio element.</p>
</audio>
-->
<div class="container">
<header class="page-header"><h1>Psychic Test</h1></header>

<!-- What are we playing again? -->
<header class="page-header"><h1>Psychic Test</h1></header>
<!-- Oh that's right -->
<!--
<h2>Are you a psychic?</h2>
<br>
<p>Is there a chance you have powers of the supernatural?</p>
<p>See if you can guess which letter the computer is thinking of.</p>
<br>
-->
<!---->
<div id="theHook">
<p>Go ahead...</p>
<p>enter a</p>
<p id="letter">letter</p>
</div>
<br />
<article class="article" id="game"></article>
<div id="main">
<p>Go ahead...</p>
<p>enter a</p>
<p id="letter">letter</p>
</div>
<br />
<article class="article" id="game"></article>

<footer class="footer">
<p class="text-muted text-muted-footer text-center">
&copy; Copyright 2018 Mark Powalisz
<audio
src="music/twilight-zone-song.mp3"
controls
autoplay
loop
></audio>
</p>
</footer>
</div>
<script src="assets/javascript/game.js"></script>

<footer class="footer">
<p class="text-muted text-muted-footer text-center">
&copy; Copyright 2017 Mark Powalisz
<audio src="music/twilight-zone-song.mp3" controls autoplay loop>
<!--
<p>If you are reading this, it is because your browser does not support the audio element.</p>
-->
</audio>
</p>
</footer>
</body>
</html>

0 comments on commit a961358

Please sign in to comment.