From ee4afef7d19d1a924d85250b060bc7d8b2b0185f Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Fri, 28 Jan 2022 02:00:55 +0000 Subject: [PATCH] add trophy and participation medal --- game.js | 3 ++ index.html | 1 + rusty_medal.svg | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ trophy.svg | 78 +++++++++++++++++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 rusty_medal.svg create mode 100644 trophy.svg diff --git a/game.js b/game.js index af2f24e..a244cbb 100644 --- a/game.js +++ b/game.js @@ -11,6 +11,7 @@ const body = document.getElementsByTagName("body")[0] const endScreen = document.getElementById("end_screen") const endScreenGuesses = document.getElementById("end_screen_guesses") const endScreenMessage = document.getElementById("end_screen_message") +const endScreenImage = document.getElementById("end_screen_image") const endScreenTime = document.getElementById("end_screen_time") const gameContainer = document.getElementById("game_container") const gridItems = [] @@ -167,8 +168,10 @@ function endGame(won) { if (won) { endScreenMessage.innerHTML = "niceeeeeeeee" + endScreenImage.src = "trophy.svg" } else { endScreenMessage.innerHTML = "damn. better luck nex time" + endScreenImage.src = "rusty_medal.svg" } endScreenGuesses.innerHTML = `guesses used: ${findCurrentLetterPosition()[0]+1}/${gridHeight}` diff --git a/index.html b/index.html index 4c5f673..7d46771 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@