From b80694c686dbae9ba1f01938d441fc695b808d11 Mon Sep 17 00:00:00 2001 From: Kristina Arezina Date: Tue, 8 Oct 2019 22:02:19 -0400 Subject: [PATCH] I have made a new game and redo feature with the use of buttons. Also, I have made a tally of the user's attempts while playing a round of the game, and their score which tracks how many matches they made within a game. Lastly, I have made a message that pops up when the user completed all the matches. All the features I added are in the div with the class of extra on the HTML page of video-11. The New Game and Redo buttons work by calling the newGame or redo functions respectively. In scripts.js for video-11 the newGame function shuffles the cards and then calls the redo function which resets all variables and turns over the cards using a for loop. In the function score, the scoreNum variable increases each time the function is called and outputs the score along with a message. Also, if the score becomes equivalent to 6 (the number of matches possible) the function outputs a congratulatory message. In the attempts function, each time it is called the attemptsNum variable increases and the new value gets outputted along with a message. --- .idea/encodings.xml | 4 + .idea/memory-game.iml | 12 +++ .idea/misc.xml | 6 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 ++ .idea/workspace.xml | 233 ++++++++++++++++++++++++++++++++++++++++++ video-10/scripts.js | 1 + video-11/index.html | 72 +++++++------ video-11/scripts.js | 71 ++++++++++--- video-11/styles.css | 34 ++++++ 10 files changed, 403 insertions(+), 44 deletions(-) create mode 100644 .idea/encodings.xml create mode 100644 .idea/memory-game.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..15a15b2 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/memory-game.iml b/.idea/memory-game.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/memory-game.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..467cff7 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..083e5a2 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unflipCards + chec + classList + vuew + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +