Skip to content

Check latest game #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: sub-branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will install Deno then run Deno lint and test.
# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Setup repo
uses: actions/checkout@v3

- name: Setup Deno
# uses: denoland/setup-deno@v1
uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
with:
deno-version: v1.x

# Uncomment this step to verify the use of 'deno fmt' on each commit.
# - name: Verify formatting
# run: deno fmt --check

- name: Run linter
run: deno lint

- name: Run tests
run: deno test -A --unstable
50 changes: 50 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
Binary file added 26293.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 0 additions & 19 deletions README.md

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

27 changes: 9 additions & 18 deletions scripts/add.js → add.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
var x = document.getElementById("myAudio");
let timeLeft = 10;
let timeLeft = 15;
let timerinterval;
highscore = 0;
score = 0;
correctAnswer = 0;

window.onload = function(){
scoreFromBrowser = localStorage.getItem("highscore");
if (scoreFromBrowser != undefined) highscore = scoreFromBrowser;
document.getElementById("highscore").innerHTML = "High Score: " + highscore;

}


function timmer(){
let timeDisplay = document.getElementById("time");
timeDisplay.hidden =false
Expand All @@ -26,13 +18,19 @@ function timmer(){
document.getElementById("btn3").hidden = true;
document.getElementById("btn4").hidden = true;
window.alert("GAME OVER!");
location.reload();
location.reload();
}
},1000)
}

function dis(){
document.getElementById("startbtn").hidden =true;
document.getElementById("startbtn").hidden = true;
document.getElementById("btn1").hidden = false;
document.getElementById("btn2").hidden = false;
document.getElementById("btn3").hidden = false;
document.getElementById("btn4").hidden = false;


}

function playAudio() {
Expand Down Expand Up @@ -91,10 +89,3 @@ function checkAnswer(buttonIndex){
document.getElementById("highscore").innerHTML = "High Score: " + highscore;
nextquestion();
}
/*

var btnsStart = document.getElementById("startbtn")

btnsStart.addEventListener ("click", checkHighscore)

*/
25 changes: 9 additions & 16 deletions additiongame.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/stylesheets/style.css">
<link rel="stylesheet" href="style.css">
<title>ADDITION GAME</title>
</head>
<body>
Expand All @@ -17,34 +17,27 @@
<div id="currentscore" type="text">Current Score: 0</div><br>
<h1 id="heading">What is the Answer?</h1>
<div id="operation">0 + 0</div>
<!--<div id="maindiv">
<input id="inputId" style="font-size: 60px;" value="0"></label>
</div>-->
<div id="time" hidden>
Time Left:
</div>
<div id="buttonDiv">
<button id="btn1" onclick="checkAnswer(1)" style="font-size: 25px">0</button>
<button id="btn2" onclick="checkAnswer(2)" style="font-size: 25px">0</button>
<button id="btn3" onclick="checkAnswer(3)" style="font-size: 25px">0</button>
<button id="btn4" onclick="checkAnswer(4)" style="font-size: 25px">0</button>
<!-- <button id="upbtn" onclick="up()" style="font-size: 30px; align-items: center">+</button>
<button id="downbtn" onclick="down()" style="font-size: 30px; align-items: center">-</button><br>
<button id="startbtn" onclick="start()" style="font-size: 30px; align-items: center">START GAME</button>
<button id="resetbtn" onclick="reset()" style="font-size: 30px; align-items: center">RESET</button>-->
<button id="btn1" hidden onclick="checkAnswer(1)" style="font-size: 25px">0</button>
<button id="btn2" hidden onclick="checkAnswer(2)" style="font-size: 25px">0</button>
<button id="btn3" hidden onclick="checkAnswer(3)" style="font-size: 25px">0</button>
<button id="btn4" hidden onclick="checkAnswer(4)" style="font-size: 25px">0</button>
</div>
<div id="startbtnDiv">
<button id="startbtn" onclick="start()">START</button>
<a href="/index.html">
<img src="/files/home.png" alt="W3Schools.com" width="60" height="80">
<a href="index.html">
<img src="home.png" alt="homeicon" width="60" height="80">
</a>
</div>
<audio id="myAudio" >
<source src="/files/beep audio.mp3" type="audio/mp3">
<source src="beep audio.mp3" type="audio/mp3">
</audio>
</div>
</body>
<script src="/scripts/add.js"></script>
<script src="add.js"></script>
</html>


Expand Down
File renamed without changes.
Binary file removed files/26293.jpg
Binary file not shown.
Binary file removed files/bg.jpg
Binary file not shown.
File renamed without changes
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Math Game</title>
<link rel="stylesheet" href="/stylesheets/indexstyle.css">
<link rel="stylesheet" href="indexstyle.css">
</head>
<body>
<video loop autoplay muted id="myVideo">
<source src="/files/Vj Loops - 32745.mp4">
<source src="Vj Loops - 32745.mp4">
</video>
<main id="main">
<div class="show">
<h1 class="">What Game would you like to play?</h1>
<section class="show">
<h4>Level 1</h4>
<a href="/additiongame.html"><button id="computerguess">ADDITION GAME</button></a>
<a href="additiongame.html"><button id="computerguess">ADDITION GAME</button></a>
<p>The computer will generate two numbers for you to add together, you have 10 seconds to hit a new highscore</p>
</section>
<section class="show">
<h4>Level 2</h4>
<a href="/subtractgame.html"><button id="computerguess">SUBTRACTION GAME</button></a>
<a href="subtractgame.html"><button id="computerguess">SUBTRACTION GAME</button></a>
<p>The computer will generate two numbers for you to subtract, you have 10 seconds to hit a new highscore</p>
</section>
<section class="show">
<h4>Level 3</h4>
<a href="/multiplicationgame.html"><button id="computerguess">MULTIPLICATION</button></a>
<a href="multiplicationgame.html"><button id="computerguess">MULTIPLICATION</button></a>
<p>The computer will generate two numbers for you to multiply, you have 10 seconds to hit a new highscore</p>
</section>
</div>
</main>

</body>
</html>
</html>
2 changes: 1 addition & 1 deletion stylesheets/indexstyle.css → indexstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ body{
position: fixed;
margin: auto;
padding-top: 50px;
background: linear-gradient(rgba(4,9,30,0.7), rgba(4,9,30,0.2)), url(/files/26293.jpg);
background: linear-gradient(rgba(4,9,30,0.7), rgba(4,9,30,0.2)), url(26293.jpg);
}

button {
Expand Down
13 changes: 5 additions & 8 deletions multiplicationgame.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/stylesheets/style.css">
<link rel="stylesheet" href="style.css">
<title>Multiplication Game</title>
</head>
<body>
Expand All @@ -17,9 +17,6 @@
<div id="currentscore" type="text">Current Score: 0</div><br>
<h1 id="heading">What is the Answer?</h1>
<div id="operation">0 × 0</div>
<!--<div id="maindiv">
<input id="inputId" style="font-size: 60px;" value="0"></label>
</div>-->
<div id="time" hidden>
Time Left:
</div>
Expand All @@ -35,16 +32,16 @@ <h1 id="heading">What is the Answer?</h1>
</div>
<div id="startbtnDiv">
<button id="startbtn" onclick="start()">START</button>
<a href="/index.html">
<img src="/files/home.png" alt="W3Schools.com" width="60" height="80">
<a href="index.html">
<img src="home.png" alt="homeicon" width="60" height="80">
</a>
</div>
<audio id="myAudio" >
<source src="/files/beep audio.mp3" type="audio/mp3">
<source src="beep audio.mp3" type="audio/mp3">
</audio>
</div>
</body>
<script src="/scripts/multiply.js"></script>
<script src="multiply.js"></script>
</html>


Expand Down
2 changes: 1 addition & 1 deletion scripts/multiply.js → multiply.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var x = document.getElementById("myAudio");
let timeLeft = 10;
let timeLeft = 15;
let timerinterval;
highscore = 0;
score = 0;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions stylesheets/style.css → style.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

/*::::::::::::::HOMEPAGE STYLING:::::::::::::::*/
/*:::::::::::HOMEPAGE STYLING::::::::::::*/
body{
min-height: 100vh;
width: 100%;
background-size: cover;
position: fixed;
margin: auto;
padding-top: 50px;
background-image: linear-gradient(rgba(4,9,30,0.7), rgba(4,9,30,0.2)), url(/files/26293.jpg);
background-image: linear-gradient(rgba(4,9,30,0.7), rgba(4,9,30,0.2)), url(26293.jpg);
}
#computerguess{
font-size: 20px;
Expand Down Expand Up @@ -178,4 +178,4 @@ button:after {
z-index: 3;
position: relative;
margin: auto;
}
}
2 changes: 1 addition & 1 deletion scripts/sub.js → sub.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var x = document.getElementById("myAudio");
let timeLeft = 10;
let timeLeft = 15;
let timerinterval;
highscore = 0;
score = 0;
Expand Down
19 changes: 6 additions & 13 deletions subtractgame.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/stylesheets/style.css">
<title>Subtract</title>
<link rel="stylesheet" href="style.css">
<title>Subtract Game</title>
</head>
<body>
<div id="gamesec">
Expand All @@ -17,9 +17,6 @@
<div id="currentscore" type="text">Current Score: 0</div><br>
<h1 id="heading">What is the Answer?</h1>
<div id="operation">0 - 0</div>
<!--<div id="maindiv">
<input id="inputId" style="font-size: 60px;" value="0"></label>
</div>-->
<div id="time" hidden>
Time Left:
</div>
Expand All @@ -28,23 +25,19 @@ <h1 id="heading">What is the Answer?</h1>
<button id="btn2" onclick="checkAnswer(2)" style="font-size: 25px">0</button>
<button id="btn3" onclick="checkAnswer(3)" style="font-size: 25px">0</button>
<button id="btn4" onclick="checkAnswer(4)" style="font-size: 25px">0</button>
<!-- <button id="upbtn" onclick="up()" style="font-size: 30px; align-items: center">+</button>
<button id="downbtn" onclick="down()" style="font-size: 30px; align-items: center">-</button><br>
<button id="startbtn" onclick="start()" style="font-size: 30px; align-items: center">START GAME</button>
<button id="resetbtn" onclick="reset()" style="font-size: 30px; align-items: center">RESET</button>-->
</div>
<div id="startbtnDiv">
<button id="startbtn" onclick="start()">START</button>
<a href="/index.html">
<img src="/files/home.png" alt="W3Schools.com" width="60" height="80">
<a href="index.html">
<img src="home.png" alt="homeicon" width="60" height="80">
</a>
</div>
<audio id="myAudio" >
<source src="/beep audio.mp3" type="audio/mp3">
<source src="beep audio.mp3" type="audio/mp3">
</audio>
</div>
</body>
<script src="/scripts/sub.js"></script>
<script src="sub.js"></script>
</html>


Expand Down