Skip to content

Commit

Permalink
Merge pull request #68 from SnowScriptWinterOfCode/revert-50-main
Browse files Browse the repository at this point in the history
Revert "My first commit"
  • Loading branch information
Akanchha112 authored Jan 17, 2024
2 parents 7758ccb + 92eccde commit f1f7685
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 102 deletions.
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

15 changes: 1 addition & 14 deletions Dark/game.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,7 @@
background-color: #56a5eb;
width: 0%;
}
#display{
border:2px solid black;
border-radius: 5px;
width:100%;
margin-bottom:2px;
display:block;
}
#display{
border:2px solid black;
border-radius: 5px;
width:100%;
margin-bottom:2px;
display:block;
}

/* LOADER */
#loader {
border: 1.6rem solid white;
Expand Down
7 changes: 2 additions & 5 deletions Dark/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="hud-main-text" id="score">
</h1>
</div>
</div>
<h2 id="question1">Question </h2><h2 id="question"></h2>
<h2 id="question"></h2>
<div class="choice-container">
<p class="choice-prefix">A</p>
<p class="choice-text" data-number="1"></p>
Expand All @@ -54,15 +54,12 @@ <h2 id="question1">Question </h2><h2 id="question"></h2>
<p class="choice-prefix">D</p>
<p class="choice-text" data-number="4"></p>
</div>

<h2 id="display">Correct option :</h2>

<label for="un-mute" class="unmute" onclick="playpause()" id="playpauseBTN">
<img src="http://upload.wikimedia.org/wikipedia/commons/3/3f/Mute_Icon.svg" alt="Mute_Icon.svg" title="Mute icon">
</label>
<label for="un-mute" class="mute" onclick="playpause()" id="playpauseBTN">
<img src="http://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg" alt="Speaker_Icon.svg" title="Unmute/speaker icon">
</label>
</label>
<footer>
<button class="next_btn">Next Ques</button>
</footer>
Expand Down
27 changes: 0 additions & 27 deletions Dark/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const time_line = document.querySelector(".time .time_line");
const timeText = document.querySelector(".timer .time_left_txt");
const timeCount = document.querySelector(".timer .timer_sec");

const question1= document.getElementById('question1');


var soundCorrect = new Audio("sounds/correctAns.mp3");
var soundIncorrect = new Audio("sounds/wrongAns.mp3");
var myMusic = new Audio("sounds/gametheme.mp3");
Expand Down Expand Up @@ -85,7 +82,6 @@ getNewQuestion = () => {
return window.location.assign('end.html');
}
questionCounter++;
question1.innerText = `Question ${questionCounter}`;//update question number
progressText.innerText = `Question ${questionCounter}/${MAX_QUESTIONS}`;
//Update the progress bar
progressBarFull.style.width = `${(questionCounter / MAX_QUESTIONS) * 100}%`;
Expand Down Expand Up @@ -141,10 +137,7 @@ choices.forEach((choice) => {
soundCorrect.play();
} else {
soundIncorrect.play();
display(currentQuestion.answer);
}
setInterval(displaynone,4000);


selectedChoice.parentElement.classList.add(classToApply);
setTimeout(() => {
Expand Down Expand Up @@ -201,27 +194,7 @@ function startTimerLine(time) {
}
}
}
let string;
function display(string) {
let display = document.getElementById('display');
if (string == 1) {
display.innerText = `Correct option : A`;
}
if (string == 2) {
display.innerText = `Correct option : B`;
}
if (string == 3) {
display.innerText = `Correct option : C`;
}
if (string == 4) {
display.innerText = `Correct option : D`;
}

}
function displaynone() {
let display = document.getElementById('display');
display.innerText = `Correct option : `;
}
incrementScore = (num) => {
score += num;
scoreText.innerText = score;
Expand Down
8 changes: 1 addition & 7 deletions Light/game.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,7 @@
background-color: #56a5eb;
width: 0%;
}
#display{
border:2px solid black;
border-radius: 5px;
width:100%;
margin-bottom:2px;
display:block;
}

/* LOADER */
#loader {
border: 1.6rem solid white;
Expand Down
21 changes: 1 addition & 20 deletions Light/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>Game-play</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="game.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
</head>
<body>
<div class="container">
Expand All @@ -22,9 +21,6 @@
<div id="progressBarFull"></div>
</div>
</div>

<div id="hud-item">

<div id="hud-item" class="time">
<div class="timer">
<div class="time_left_txt">Time Left</div>
Expand All @@ -33,7 +29,6 @@
<div class="time_line"></div>
</div>
<div id="hud-item">

<p class="hud-prefix">
Score
</p>
Expand All @@ -42,7 +37,7 @@ <h1 class="hud-main-text" id="score">
</h1>
</div>
</div>
<h2 id="question1">Question </h2><h2 id="question"></h2>
<h2 id="question"></h2>
<div class="choice-container">
<p class="choice-prefix">A</p>
<p class="choice-text" data-number="1"></p>
Expand All @@ -59,7 +54,6 @@ <h2 id="question1">Question </h2><h2 id="question"></h2>
<p class="choice-prefix">D</p>
<p class="choice-text" data-number="4"></p>
</div>

<label for="un-mute" class="unmute" onclick="playpause()" id="playpauseBTN">
<img src="http://upload.wikimedia.org/wikipedia/commons/3/3f/Mute_Icon.svg" alt="Mute_Icon.svg" title="Mute icon">
</label>
Expand All @@ -69,21 +63,8 @@ <h2 id="question1">Question </h2><h2 id="question"></h2>
<footer>
<button class="next_btn">Next Ques</button>
</footer>

</div>
</div>

<div>
<input type="checkbox" class="checkbox" id="checkbox">
<label for="checkbox" class="label">
<i class="fas fa-moon"></i>
<i class='fas fa-sun'></i>
<div class='ball'>
</label>
</div>
</div>

<script src="toggle.js"></script>
<script src="game.js"></script>
</body>
</html>
27 changes: 1 addition & 26 deletions Light/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ const time_line = document.querySelector(".time .time_line");
const timeText = document.querySelector(".timer .time_left_txt");
const timeCount = document.querySelector(".timer .timer_sec");

const question1 = document.getElementById('question1');


var soundCorrect = new Audio("sounds/correctAns.mp3");
var soundIncorrect = new Audio("sounds/wrongAns.mp3");
var myMusic = new Audio("sounds/gametheme.mp3");
Expand Down Expand Up @@ -85,7 +82,6 @@ getNewQuestion = () => {
return window.location.assign('end.html');
}
questionCounter++;
question1.innerText = `Question ${questionCounter}`;//update question number
progressText.innerText = `Question ${questionCounter}/${MAX_QUESTIONS}`;
//Update the progress bar
progressBarFull.style.width = `${(questionCounter / MAX_QUESTIONS) * 100}%`;
Expand Down Expand Up @@ -141,9 +137,8 @@ choices.forEach((choice) => {
soundCorrect.play();
} else {
soundIncorrect.play();
display(currentQuestion.answer);
}
setInterval(displaynone,4000);

selectedChoice.parentElement.classList.add(classToApply);
setTimeout(() => {
selectedChoice.parentElement.classList.remove(classToApply);
Expand Down Expand Up @@ -199,27 +194,7 @@ function startTimerLine(time) {
}
}
}
let string;
function display(string) {
let display = document.getElementById('display');
if (string == 1) {
display.innerText = `Correct option : A`;
}
if (string == 2) {
display.innerText = `Correct option : B`;
}
if (string == 3) {
display.innerText = `Correct option : C`;
}
if (string == 4) {
display.innerText = `Correct option : D`;
}

}
function displaynone() {
let display = document.getElementById('display');
display.innerText = `Correct option : `;
}
incrementScore = (num) => {
score += num;
scoreText.innerText = score;
Expand Down

0 comments on commit f1f7685

Please sign in to comment.