From 8824e39cd63a38443a6c3c7e46a0a97f51a992c8 Mon Sep 17 00:00:00 2001 From: mrdandelion6 Date: Mon, 8 Jan 2024 20:55:29 -0500 Subject: [PATCH] implemented score tracking, winning and losing, game now is fully functional aside from music/sounds and customizable keybinds --- css/style.css | 30 +++++- index.html | 17 ++++ js/script.js | 270 ++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 282 insertions(+), 35 deletions(-) diff --git a/css/style.css b/css/style.css index 825624e..c732842 100644 --- a/css/style.css +++ b/css/style.css @@ -30,7 +30,7 @@ a { position: fixed; width: 100vw; justify-content: flex-end; - z-index: 3; + z-index: 4; } #popmenu { @@ -511,7 +511,7 @@ footer { } #pongExitPrompt, #pongSPPrompt, #pongMPPrompt, #backToMenuPrompt, #restartPrompt { - z-index: 2; + z-index: 3; margin: 0; height: 300px; width: calc(max(400px, 16vw)); @@ -570,3 +570,29 @@ footer { margin-left: calc(12vw) !important; margin-right: 0; } + +#playerTwoScore { + position: absolute; + /* top: 190px; + left: calc(20% - 16px); */ + top: 60px; + left: calc(50% - 60px); + z-index: 2; + margin: 0; + font-size: 35px; +} + +#playerOneScore { + position: absolute; + /* top: 190px; + left: calc(80% - 16px); */ + top: 60px; + left: calc(50% + 40px); + z-index: 2; + margin: 0; + font-size: 35px; +} + +.endTitle { + margin-bottom: 140px !important; +} \ No newline at end of file diff --git a/index.html b/index.html index 245aced..5331d0a 100644 --- a/index.html +++ b/index.html @@ -115,11 +115,28 @@

> play pong

(Y) yes   (N) no

+ + + + +