From 89382961474c2d829293212a2601a93dcc6c3a5d Mon Sep 17 00:00:00 2001 From: n-keerthi-gayathri Date: Fri, 26 Jan 2024 23:26:00 +0530 Subject: [PATCH 1/2] Added Time Limit --- css/game.css | 17 ++++- pages/game.html | 170 ++++++++++++++++++++++++++---------------------- 2 files changed, 109 insertions(+), 78 deletions(-) diff --git a/css/game.css b/css/game.css index 4672d1f..90471c5 100644 --- a/css/game.css +++ b/css/game.css @@ -109,4 +109,19 @@ body { transform: scale(2); opacity: 0; } -} \ No newline at end of file +} +#timer-container { + text-align: center; + margin-top: 10px; +} + +#timer-prefix { + margin-bottom: 5px; + font-size: 16px; +} + +#timer { + font-size: 24px; + font-weight: bold; + color: #ff0000; /* Set the color of the timer */ +} diff --git a/pages/game.html b/pages/game.html index 657b1be..95d060d 100644 --- a/pages/game.html +++ b/pages/game.html @@ -1,91 +1,107 @@ - - - - - - Quiz Page - Main Game + + + + + + Quiz Page - Main Game + + + - + }, 1000); + } - -
-
-
-
-

Question

-
-
-
-
-
-

Score

-

0

-

-

-100

+ function resetTimer() { + clearInterval(timer); + timeLimit = 10; + updateTimerDisplay(); + startTimer(); + } + + startTimer(); + + + +
+
+
+
+

Question

+
+
-

What is the answer to this question

-
-

A

-

Choice

-
-
-

B

-

Choice 2

-
-
-

C

-

Choice 3

-
-
-

D

-

Choice 4

+
+

Score

+

0

+

+

-100

-
-
- - -
- - - Music Off +
+

Time Left:

+

10s

+
+

What is the answer to this question

+
+

A

+

Choice

+
+
+

B

+

Choice 2

+
+

C

+

Choice 3

+
+
+

D

+

Choice 4

+
+
+
+ + + From 29a7bfdb7e368fbc7e2fae6c95adf5bc16c2f7fe Mon Sep 17 00:00:00 2001 From: n-keerthi-gayathri <118381441+n-keerthi-gayathri@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:32:08 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41a85e1..af81fec 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Incase, music isn't playing for you, please do the following steps: The issue should be fixed. Incase of any further issue, please file a [Bug Report](https://github.com/KendallDoesCoding/quiz/issues/new?assignees=&labels=%F0%9F%9B%A0+goal%3A+fix&template=bug.yml). -# Links and Topics +# Links and Topicssssss #### [Tutorial Video](https://www.youtube.com/watch?v=f4fB9Xg2JEY)