diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml new file mode 100644 index 0000000..930e471 --- /dev/null +++ b/.github/workflows/deno.yml @@ -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 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..30877b0 --- /dev/null +++ b/.github/workflows/pages.yml @@ -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 diff --git a/26293.jpg b/26293.jpg new file mode 100644 index 0000000..1c853c9 Binary files /dev/null and b/26293.jpg differ diff --git a/README.md b/README.md deleted file mode 100644 index 75c7343..0000000 --- a/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Games - -I have designed and code 3 games in this repository. - - - -2. ADDIIONAL GAME: -The computer will generate two numbers for you to add together, you have 10 seconds to hit a new highscore - -1. Subtraction: -The computer will generate a random number between 1 to 9 and you have to guess it before the time reaches 0! - -3. Multiplication Game: -The computer will generate two numbers for you to multiply, you have 10 seconds to hit a new highscore - - -I am able to do this with the use of HTML/CSS and javascript, -one of the key things i learnt while building the game is how to use persitant data(aka, cookies). You will notice that even when you -refresh the pages, your high score remains the same, that way you don't miss out on any of it. diff --git a/files/Vj Loops - 32745.mp4 b/Vj Loops - 32745.mp4 similarity index 100% rename from files/Vj Loops - 32745.mp4 rename to Vj Loops - 32745.mp4 diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c419263..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file diff --git a/scripts/add.js b/add.js similarity index 85% rename from scripts/add.js rename to add.js index 97c76fc..c7dc6a1 100644 --- a/scripts/add.js +++ b/add.js @@ -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 @@ -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() { @@ -91,10 +89,3 @@ function checkAnswer(buttonIndex){ document.getElementById("highscore").innerHTML = "High Score: " + highscore; nextquestion(); } -/* - -var btnsStart = document.getElementById("startbtn") - -btnsStart.addEventListener ("click", checkHighscore) - -*/ diff --git a/additiongame.html b/additiongame.html index 35c4306..46111ed 100644 --- a/additiongame.html +++ b/additiongame.html @@ -4,7 +4,7 @@ - +