diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..6f3a2913 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/README.md b/README.md index 60f55e53..abbcd5de 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,21 @@ Start by briefly describing the assignment in a sentence or two. Keep it short a ## The problem -Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next? +I felt like this week was a little easier, so I decided to change photos and add different chatagories and values, and everything got messed up. I made a duplicate and went back to my old code. I will try to fix the issue tomorrow, but at least this code works. + +tuesday 12.09.23 +I started working on the code again after sunday; to change the theme, pictures, add another chategory and I also wanted to the option text to appear in the alert and not the value. + +with the option text Sakura Tanaka helped me figure out the "textForAlert", she gave suggestions I could try and it worked. I kept overcomplicating it, I tried removewhite space and trim() but I don't thing any of them actually do what I tried to. After I failed finding a soultion I reached out to her cuz she had solved the text vs value in her code. + +I truggeled quite a bit with adding another option to my game. First I didn't think of adding other: [] property to all my "character objects". Then I struggeled with the charactersInPlay filtering. I think the soulution was: return !keep; But at this point I'm quite confused. + +I decided not to start changing the word "person" in my code even if my new theme is guess song and not person in: "charactersInPlay.forEach((person) => {})" because I honestly didn't want to risk messing anything up. + +I still havent assigned the correct values to correct song (If you are a swiftie you know), and I still have quite a bit css styling to do, but for now I need to focus on this weeks project. + +I also have to go trough all my comments and remove what no longer is necessary. I wrote qute a lot to try to keep track of what I was doing, but I think it's too much now. ## View it live -Have you deployed your project somewhere? Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about. +https://guess-who-elbine.netlify.app/ diff --git a/code/images/IBYTAM.jpg b/code/images/IBYTAM.jpg new file mode 100644 index 00000000..8b5e9259 Binary files /dev/null and b/code/images/IBYTAM.jpg differ diff --git a/code/images/LWYMMD.jpg b/code/images/LWYMMD.jpg new file mode 100644 index 00000000..28ba7eb6 Binary files /dev/null and b/code/images/LWYMMD.jpg differ diff --git a/code/images/RWYLM.jpg b/code/images/RWYLM.jpg new file mode 100644 index 00000000..36036771 Binary files /dev/null and b/code/images/RWYLM.jpg differ diff --git a/code/images/THEMAN.png b/code/images/THEMAN.png new file mode 100644 index 00000000..9d6f0f99 Binary files /dev/null and b/code/images/THEMAN.png differ diff --git a/code/images/WANEGBT.jpg b/code/images/WANEGBT.jpg new file mode 100644 index 00000000..c1befe4a Binary files /dev/null and b/code/images/WANEGBT.jpg differ diff --git a/code/images/YNTCD.jpeg b/code/images/YNTCD.jpeg new file mode 100644 index 00000000..b340e84f Binary files /dev/null and b/code/images/YNTCD.jpeg differ diff --git a/code/images/YOYOK.jpg b/code/images/YOYOK.jpg new file mode 100644 index 00000000..ce3966d1 Binary files /dev/null and b/code/images/YOYOK.jpg differ diff --git a/code/images/alltoowell.jpg b/code/images/alltoowell.jpg new file mode 100644 index 00000000..c00375ff Binary files /dev/null and b/code/images/alltoowell.jpg differ diff --git a/code/images/antihero.jpg b/code/images/antihero.jpg new file mode 100644 index 00000000..af7ae15b Binary files /dev/null and b/code/images/antihero.jpg differ diff --git a/code/images/antiheroT.jpg b/code/images/antiheroT.jpg new file mode 100644 index 00000000..316968c0 Binary files /dev/null and b/code/images/antiheroT.jpg differ diff --git a/code/images/badblood.jpg b/code/images/badblood.jpg new file mode 100644 index 00000000..146a28a4 Binary files /dev/null and b/code/images/badblood.jpg differ diff --git a/code/images/blankspace.png b/code/images/blankspace.png new file mode 100644 index 00000000..850318e6 Binary files /dev/null and b/code/images/blankspace.png differ diff --git a/code/images/champagneproblems.png b/code/images/champagneproblems.png new file mode 100644 index 00000000..ba433e93 Binary files /dev/null and b/code/images/champagneproblems.png differ diff --git a/code/images/corneliastreet.png b/code/images/corneliastreet.png new file mode 100644 index 00000000..e6b0e0a6 Binary files /dev/null and b/code/images/corneliastreet.png differ diff --git a/code/images/cowboylikeme.jpg b/code/images/cowboylikeme.jpg new file mode 100644 index 00000000..ebde3b87 Binary files /dev/null and b/code/images/cowboylikeme.jpg differ diff --git a/code/images/cruelsummer.jpg b/code/images/cruelsummer.jpg new file mode 100644 index 00000000..547170bc Binary files /dev/null and b/code/images/cruelsummer.jpg differ diff --git a/code/images/delicate.png b/code/images/delicate.png new file mode 100644 index 00000000..9c91cd4b Binary files /dev/null and b/code/images/delicate.png differ diff --git a/code/images/eletrictouch.jpg b/code/images/eletrictouch.jpg new file mode 100644 index 00000000..7345147b Binary files /dev/null and b/code/images/eletrictouch.jpg differ diff --git a/code/images/fearless.png b/code/images/fearless.png new file mode 100644 index 00000000..b18149c0 Binary files /dev/null and b/code/images/fearless.png differ diff --git a/code/images/iknowplaces.jpg b/code/images/iknowplaces.jpg new file mode 100644 index 00000000..f961e70f Binary files /dev/null and b/code/images/iknowplaces.jpg differ diff --git a/code/images/illicitaffair.jpg b/code/images/illicitaffair.jpg new file mode 100644 index 00000000..81f64233 Binary files /dev/null and b/code/images/illicitaffair.jpg differ diff --git a/code/images/jabala.svg b/code/images/jabala.svg deleted file mode 100644 index 6875c4f8..00000000 --- a/code/images/jabala.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 54 \ No newline at end of file diff --git a/code/images/jack.svg b/code/images/jack.svg deleted file mode 100644 index 68dfb982..00000000 --- a/code/images/jack.svg +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Artboard 9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jacques.svg b/code/images/jacques.svg deleted file mode 100644 index f20284a2..00000000 --- a/code/images/jacques.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - -3 pipe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jai.svg b/code/images/jai.svg deleted file mode 100644 index 9c4eaeed..00000000 --- a/code/images/jai.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - -2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jake.svg b/code/images/jake.svg deleted file mode 100644 index 060d9b9c..00000000 --- a/code/images/jake.svg +++ /dev/null @@ -1,103 +0,0 @@ - - - - -Artboard 25 copy 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/james.svg b/code/images/james.svg deleted file mode 100644 index 1a994dd1..00000000 --- a/code/images/james.svg +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Artboard 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jana.svg b/code/images/jana.svg deleted file mode 100644 index 957ef822..00000000 --- a/code/images/jana.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 2 \ No newline at end of file diff --git a/code/images/jane.svg b/code/images/jane.svg deleted file mode 100644 index 41ff91b0..00000000 --- a/code/images/jane.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 21 \ No newline at end of file diff --git a/code/images/jaqueline.svg b/code/images/jaqueline.svg deleted file mode 100644 index 1ebb90dc..00000000 --- a/code/images/jaqueline.svg +++ /dev/null @@ -1,165 +0,0 @@ - - - - -Artboard 25 copy 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jazebelle.svg b/code/images/jazebelle.svg deleted file mode 100644 index 15e30e0d..00000000 --- a/code/images/jazebelle.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 25 copy 6 \ No newline at end of file diff --git a/code/images/jean.svg b/code/images/jean.svg deleted file mode 100644 index 8fa89d9f..00000000 --- a/code/images/jean.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - -Artboard 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jeane.svg b/code/images/jeane.svg deleted file mode 100644 index a07a294e..00000000 --- a/code/images/jeane.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - -Artboard 25 copy 7 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jed.svg b/code/images/jed.svg deleted file mode 100644 index 501ee116..00000000 --- a/code/images/jed.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - -3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jenni.svg b/code/images/jenni.svg deleted file mode 100644 index a6c50108..00000000 --- a/code/images/jenni.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - -Artboard 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jeri.svg b/code/images/jeri.svg deleted file mode 100644 index ac0c395f..00000000 --- a/code/images/jeri.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - -Artboard 21 copy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jerry.svg b/code/images/jerry.svg deleted file mode 100644 index f0c8e641..00000000 --- a/code/images/jerry.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - -Artboard 1 copy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jess.svg b/code/images/jess.svg deleted file mode 100644 index f845b976..00000000 --- a/code/images/jess.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - -Artboard 25 copy - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jia.svg b/code/images/jia.svg deleted file mode 100644 index 7e313924..00000000 --- a/code/images/jia.svg +++ /dev/null @@ -1,52 +0,0 @@ - - - - -Artboard 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jocelyn.svg b/code/images/jocelyn.svg deleted file mode 100644 index dd08f3ef..00000000 --- a/code/images/jocelyn.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - - -Artboard 21 copy 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jodi.svg b/code/images/jodi.svg deleted file mode 100644 index 864f7be1..00000000 --- a/code/images/jodi.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - - -Artboard 21 copy 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/joe.svg b/code/images/joe.svg deleted file mode 100644 index b2878ffc..00000000 --- a/code/images/joe.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - -Artboard 54 copy - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jolee.svg b/code/images/jolee.svg deleted file mode 100644 index d2048e28..00000000 --- a/code/images/jolee.svg +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Artboard 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jon.svg b/code/images/jon.svg deleted file mode 100644 index 8138984b..00000000 --- a/code/images/jon.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Artboard 25 - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jordan.svg b/code/images/jordan.svg deleted file mode 100644 index 2b7b6bf4..00000000 --- a/code/images/jordan.svg +++ /dev/null @@ -1,81 +0,0 @@ - - - - -Artboard 54 copy 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/josephine.svg b/code/images/josephine.svg deleted file mode 100644 index a0f28f58..00000000 --- a/code/images/josephine.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - -Artboard 25 copy 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/josh.svg b/code/images/josh.svg deleted file mode 100644 index de676a8c..00000000 --- a/code/images/josh.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/jude.svg b/code/images/jude.svg deleted file mode 100644 index 64252cb3..00000000 --- a/code/images/jude.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - - -Artboard 25 copy 5 - - - - - - - - - - - - - - - - - - - diff --git a/code/images/julie.svg b/code/images/julie.svg deleted file mode 100644 index 253eb566..00000000 --- a/code/images/julie.svg +++ /dev/null @@ -1,118 +0,0 @@ - - - - -Artboard 54 copy 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/code/images/longlive.jpg b/code/images/longlive.jpg new file mode 100644 index 00000000..33da3f20 Binary files /dev/null and b/code/images/longlive.jpg differ diff --git a/code/images/lovestory.png b/code/images/lovestory.png new file mode 100644 index 00000000..615ddcdf Binary files /dev/null and b/code/images/lovestory.png differ diff --git a/code/images/madwoman.png b/code/images/madwoman.png new file mode 100644 index 00000000..6e820e36 Binary files /dev/null and b/code/images/madwoman.png differ diff --git a/code/images/maroon.jpg b/code/images/maroon.jpg new file mode 100644 index 00000000..81b8d6bf Binary files /dev/null and b/code/images/maroon.jpg differ diff --git a/code/images/mean.jpg b/code/images/mean.jpg new file mode 100644 index 00000000..84fb703a Binary files /dev/null and b/code/images/mean.jpg differ diff --git a/code/images/midnightrain.jpg b/code/images/midnightrain.jpg new file mode 100644 index 00000000..3f890931 Binary files /dev/null and b/code/images/midnightrain.jpg differ diff --git a/code/images/midright.jpg b/code/images/midright.jpg new file mode 100644 index 00000000..ed97320c Binary files /dev/null and b/code/images/midright.jpg differ diff --git a/code/images/mirrorball.jpg b/code/images/mirrorball.jpg new file mode 100644 index 00000000..eb708dbd Binary files /dev/null and b/code/images/mirrorball.jpg differ diff --git a/code/images/readyforit.png b/code/images/readyforit.png new file mode 100644 index 00000000..9d56e929 Binary files /dev/null and b/code/images/readyforit.png differ diff --git a/code/images/shouldvesaidno.png b/code/images/shouldvesaidno.png new file mode 100644 index 00000000..32d98e17 Binary files /dev/null and b/code/images/shouldvesaidno.png differ diff --git a/code/images/tolerateit.jpg b/code/images/tolerateit.jpg new file mode 100644 index 00000000..3402eae8 Binary files /dev/null and b/code/images/tolerateit.jpg differ diff --git a/code/index.html b/code/index.html index 0479b061..bdfc79f2 100644 --- a/code/index.html +++ b/code/index.html @@ -1,64 +1,94 @@ - - - - Project Name - - - - - - -
-
-
- -
-
- Guess Who -

- -
-
- - - + + + + + Elbines TS guessing game + + + + + + + + + + + + + + +
+
+
+ + +
+
+ +

+ + + +
+
+ + + + \ No newline at end of file diff --git a/code/script.js b/code/script.js index 5207730c..b34d7521 100644 --- a/code/script.js +++ b/code/script.js @@ -1,215 +1,304 @@ // All the DOM selectors stored as short variables const board = document.getElementById('board') +//in html: populates the board const questions = document.getElementById('questions') +//DROPDOWN SELECT ELEMENTS "question" (value and label html) const restartButton = document.getElementById('restart') +//Reach the restart button +const findOutBtn = document.getElementById("filter"); +const playAgainButton = document.getElementById("playAgain"); +const winOrLoseText = document.getElementById("winOrLoseText"); +const winOrLose = document.getElementById('winOrLose'); // Array with all the characters, as objects const CHARACTERS = [ { - name: 'Jabala', - img: 'images/jabala.svg', - hair: 'hidden', - eyes: 'hidden', - accessories: ['glasses', 'hat'], + name: 'You need to calm down', + img: 'images/YNTCD.jpeg', + versions: 'owned', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: 'lifelessons', other: [] }, { - name: 'Jack', - img: 'images/jack.svg', - hair: 'hidden', - eyes: 'blue', - accessories: ['hat'], + name: 'Mean', + img: 'images/mean.jpg', + versions: ['taylorsV', 'owned'], + erastour: 'surprise', + cinematic: 'musicvid', + songtheme: 'lifelessons', other: [] }, { - name: 'Jacques', - img: 'images/jacques.svg', - hair: 'grey', - eyes: 'blue', - accessories: ['hat'], - other: ['smoker'] + name: 'Cornelia street', + img: 'images/corneliastreet.png', + versions: 'owned', + erastour: 'surprise', + cinematic: 'musicvid', + songtheme: ['relationship', 'heartbreak'], + other: [] }, { - name: 'Jai', - img: 'images/jai.svg', - hair: 'black', - eyes: 'brown', - accessories: [], + name: 'The Man', + img: 'images/THEMAN.png', + versions: 'owned', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: 'lifelessons', other: [] }, { - name: 'Jake', - img: 'images/jake.svg', - hair: 'yellow', - eyes: 'green', - accessories: ['glasses'], + name: 'Look what you made me do', + img: 'images/LWYMMD.jpg', + versions: 'stolen', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: 'lifelessons', other: [] }, { - name: 'James', - img: 'images/james.svg', - hair: 'brown', - eyes: 'green', - accessories: ['glasses'], + name: 'Delicate', + img: 'images/Delicate.png', + versions: 'stolen', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: ['lifelessons', 'relationship'], other: [] }, { - name: 'Jana', - img: 'images/jana.svg', - hair: 'black', - eyes: 'hidden', - accessories: ['glasses'], + name: 'Ready for it', + img: 'images/readyforit.png', + versions: 'stolen', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: ['lifelessons', 'relationship'], other: [] }, { - name: 'Jane', - img: 'images/jane.svg', - hair: 'yellow', - eyes: 'hidden', - accessories: ['glasses'], + name: 'Anti-hero', + img: 'images/antihero.jpg', + versions: 'owned', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: 'lifelessons', other: [] }, { - name: 'Jaqueline', - img: 'images/jaqueline.svg', - hair: 'orange', - eyes: 'green', - accessories: ['glasses'], + name: 'Cruel summer', + img: 'images/cruelsummer.jpg', + versions: 'owned', + erastour: 'setlist', + cinematic: 'noMusicvideo', + songtheme: 'relationship', + other: [] + }, + { + name: 'WANEGBT', + img: 'images/WANEGBT.jpg', + versions: 'taylorsV', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: ['heartbreak', 'breakup'], + other: [] + }, + { + name: 'You’re on your own kid', + img: 'images/YOYOK.jpg', + versions: 'owned', + erastour: 'surpTwice', + cinematic: 'noMusicvideo', + songtheme: ['heartbreak', 'lifelessons'], + other: [] + }, + { + name: 'All too well', + img: 'images/alltoowell.jpg', + versions: 'taylorsV', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: ['breakups', 'relationship', 'heartbreak'], + other: 'fromTheV', + }, + { + name: 'Midnight rain', + img: 'images/midnightrain.jpg', + versions: 'owned', + erastour: 'setlist', + cinematic: 'noMusicvideo', + songtheme: ['breakups', 'relationship', 'heartbreak'], other: [] }, - { - name: 'Jazebelle', - img: 'images/jazebelle.svg', - hair: 'purple', - eyes: 'hidden', - accessories: ['glasses'], - other: ['smoker'] + name: 'I bet you think about me ', + img: 'images/IBYTAM.jpg', + versions: 'taylorsV', + erastour: 'surprise', + cinematic: 'musicvid', + songtheme: ['breakups', 'heartbreak'], + other: ['fromTheV', 'collaboration'] }, { - name: 'Jean', - img: 'images/jean.svg', - hair: 'brown', - eyes: 'blue', - accessories: ['glasses', 'hat'], - other: ['smoker'] + name: 'Fearless', + img: 'images/fearless.png', + versions: 'taylorsV', + erastour: 'setlist', + cinematic: 'noMusicvideo', + songtheme: 'relationship', + other: [] }, { - name: 'Jeane', - img: 'images/jeane.svg', - hair: 'brown', - eyes: 'green', - accessories: ['glasses'], + name: 'Should´ve said no', + img: 'images/shouldvesaidno.png', + versions: 'stolen', + erastour: 'surprise', + cinematic: 'noMusicvideo', + songtheme: ['relationship', 'breakup'], other: [] }, { - name: 'Jed', - img: 'images/jed.svg', - hair: 'orange', - eyes: 'green', - accessories: ['glasses', 'hat'], - other: ['smoker'] + name: 'Right where you left me', + img: 'images/RWYLM.jpg', + versions: 'owned', + erastour: 'surprise', + cinematic: 'noMusicvideo', + songtheme: ['heartbreak', 'relationship', 'breakup'], + other: [] }, { - name: 'Jenni', - img: 'images/jenni.svg', - hair: 'white', - eyes: 'hidden', - accessories: ['hat'], + name: 'Cowboy like me', + img: 'images/cowboylikeme.jpg', + versions: 'owned', + erastour: 'surprise', + cinematic: 'noMusicvideo', + songtheme: 'relationship', other: [] }, { - name: 'Jeri', - img: 'images/jeri.svg', - hair: 'orange', - eyes: 'green', - accessories: ['glasses'], + name: 'Tolerate it', + img: 'images/tolerateit.jpg', + versions: 'owned', + erastour: 'setlist', + cinematic: 'noMusicvideo', + songtheme: ['heartbreak', 'relationship'], other: [] }, { - name: 'Jerry', - img: 'images/jerry.svg', - hair: 'hidden', - eyes: 'blue', - accessories: ['hat'], + name: 'Blank space', + img: 'images/blankspace.png', + versions: 'stolen', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: ['lifelessons', 'relationship', 'breakup'], other: [] }, { - name: 'Jess', - img: 'images/jess.svg', - hair: 'black', - eyes: 'blue', - accessories: ['glasses'], + name: 'Bad blood', + img: 'images/badblood.jpg', + versions: 'stolen', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: ['lifelessons', 'relationship'], + other: 'collaboration' + }, + { + name: 'Mirrorball', + img: 'images/mirrorball.jpg', + versions: 'owned', + erastour: 'surprise', + cinematic: 'noMusicvideo', + songtheme: ['lifelessons', 'relationship'], other: [] }, { - name: 'Jocelyn', - img: 'images/jocelyn.svg', - hair: 'black', - eyes: 'brown', - accessories: ['glasses'], + name: 'I know places', + img: 'images/iknowplaces.jpg', + versions: 'stolen', + erastour: 'surprise', + cinematic: 'noMusicvideo', + songtheme: ['lifelessons', 'relationship'], other: [] }, { - name: 'Jon', - img: 'images/jon.svg', - hair: 'brown', - eyes: 'green', - accessories: ['glasses'], + name: 'Love story', + img: 'images/lovestory.png', + versions: 'taylorsV', + erastour: 'setlist', + cinematic: 'musicvid', + songtheme: 'relationship', other: [] }, { - name: 'Jordan', - img: 'images/jordan.svg', - hair: 'yellow', - eyes: 'hidden', - accessories: ['glasses', 'hat'], + name: 'Electric touch', + img: 'images/eletrictouch.jpg', + versions: 'taylorsV', + erastour: [], + cinematic: 'noMusicvideo', + songtheme: 'relationship', + other: ['fromTheV', 'collaboration'] + }, + { + name: 'Mad woman', + img: 'images/madwoman.png', + versions: 'owned', + erastour: 'surprise', + cinematic: 'noMusicvideo', + songtheme: ['lifelessons', 'relationship', 'breakup'], other: [] }, { - name: 'Josephine', - img: 'images/josephine.svg', - hair: 'grey', - eyes: 'brown', - accessories: [], + name: 'Illicit affairs', + img: 'images/illicitaffair.jpg', + versions: 'owned', + erastour: 'setlist', + cinematic: 'noMusicvideo', + songtheme: ['lifelessons', 'relationship', 'heartbreak'], other: [] }, { - name: 'Josh', - img: 'images/josh.svg', - hair: 'yellow', - eyes: 'green', - accessories: [], + name: 'Maroon', + img: 'images/maroon.jpg', + versions: 'owned', + erastour: 'surpTwice', + cinematic: 'noMusicvideo', + songtheme: ['breakup', 'relationship', 'heartbreak'], other: [] }, { - name: 'Jude', - img: 'images/jude.svg', - hair: 'black', - eyes: 'green', - accessories: [], + name: 'Long live', + img: 'images/longlive.jpg', + versions: 'taylorsV', + erastour: ['surprise', 'setlist'], + cinematic: 'noMusicvideo', + songtheme: ['lifelessons', 'relationship'], other: [] }, { - name: 'Julie', - img: 'images/julie.svg', - hair: 'black', - eyes: 'brown', - accessories: ['glasses', 'hat'], + name: 'Champagne problems',//!! + img: 'images/champagneproblems.png', + versions: 'owned', + erastour: 'setlist', + cinematic: 'noMusicvideo', + songtheme: ['heartbreak', 'relationship', 'breakup'], other: [] }, ] - // Global variables -let secret -let currentQuestion -let charactersInPlay - -// Draw the game board +let secret //Will be the secret person object (Stores secret person selected in setSecret func.) +let currentQuestion //Will be the current question object +let charactersInPlay //Will be an array of all the people left in the game +let personToConfirm; +let textForAlert//S +// Draw the game board const generateBoard = () => { - board.innerHTML = '' + board.innerHTML = '' //code will also filter the boards (safetyline?) charactersInPlay.forEach((person) => { - board.innerHTML += ` + //+ adds to the html, does not overwrite it. + //it "Grabs" the board element and changing the inner html + board.innerHTML += + //use the information in the array (charactersInPlay) to shoe information about people. + //${person.name} the value of all the names in array (CHARACTERS) + `

${person.name}

${person.name} @@ -221,105 +310,185 @@ const generateBoard = () => { ` }) } - // Randomly select a person from the characters array and set as the value of the variable called secret +//Math built in js methods (so that we will get a random person every time, if we use 0 it will always be the first person) const setSecret = () => { secret = charactersInPlay[Math.floor(Math.random() * charactersInPlay.length)] + console.log(secret); } // This function to start (and restart) the game const start = () => { - // Here we're setting charactersInPlay array to be all the characters to start with + // Here we're setting charactersInPlay array to be all of the characters to start with charactersInPlay = CHARACTERS - // What else should happen when we start the game? + // Here I can add if anything else should happen when we start the game? + winOrLose.style.display = 'none'; //Got help with this during demo from the strawberry team :) + setSecret(); //Secret person selected (let secret, const setSecret = () => {) + generateBoard();// Board made visible. + console.log("Start function called"); } -// setting the currentQuestion object when you select something in the dropdown +// This variable (catagory) stores what option group (category) the question belongs to. +// Variable that stores the actual value of the question we've selected.--> +//Careful to not mistake value attribute of the