From 4fca94be34c5bddc2ea559f31dafb15e41a3a1b0 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Tue, 24 May 2016 14:17:04 -0400 Subject: [PATCH 1/8] morning work solutions --- unit_01/w02d02/morning_exercise/solutions.js | 52 ++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 unit_01/w02d02/morning_exercise/solutions.js diff --git a/unit_01/w02d02/morning_exercise/solutions.js b/unit_01/w02d02/morning_exercise/solutions.js new file mode 100644 index 0000000..cde6150 --- /dev/null +++ b/unit_01/w02d02/morning_exercise/solutions.js @@ -0,0 +1,52 @@ +// words = ["Ho", "Chi", "Minh", "City", "was", "once", "known", "as", "Prey", "Nokor"]; +// +// words.forEach(function (e){ +// console.log(e.toUpperCase()); +// }); + + +///////////////////// + + +// more_words = ["Joe", "Overreats", "Eggs"]; +// +// +// var new_arr = more_words.map(function (i){ +// return i.charAt(0); +// }); +// +// console.log (new_arr); + +/////////////////// + +// arr = [8, 8, 8, 8, 8, 8, 8, 8]; +// +// new_value = arr.reduce(function(product, n){ +// return product *= n +// }); +// +// console.log(new_value); + +///////////////////// + +var sheepShearers = [ + { + name: "Tim", + age: 20, + sheepCount: 18 + }, + { + name: "C3PO", + age: 200, + sheepCount: 320 + }, + { + name: "Cousin It", + age: Infinity, + sheepCount: 2900 + } +]; + +var total = sheepShearers.map(function(e){return e.sheepCount})).reduce(function(sum, num) {resturn sum += num;}); + +console.log (total); From 99305507e652d0b9df75fed1c11f3efe30b800fa Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:06:11 -0400 Subject: [PATCH 2/8] memory files modified --- .../memory_starter/README.md | 57 +++++++++++++++ .../memory_starter/css/style.css | 67 ++++++++++++++++++ .../memory_starter/index.html | 21 ++++++ .../memory_starter/js/app.js | 70 +++++++++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md create mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css create mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html create mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md new file mode 100644 index 0000000..6e09bd0 --- /dev/null +++ b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md @@ -0,0 +1,57 @@ +# Memory! + +Tonight you are going to build the game called: [Memory](https://en.wikipedia.org/wiki/Concentration_(game)). We have provided you with a few starter files. You will look at the `index.html` to set up your physical board and cards, but write the code in your `app.js` file to get your game to work. + +Take it one step at a time. Follow these instructions to help get you going. + + +### You will need + +#### Data + +- an array of ten tiles + - your ten 'tiles' will represent the letter values that will be displayed on each DOM tile. eg. ['A', 'A', 'B', 'B', etc.] + +#### Functions + +- `start()` + - shuffle the tiles array + - then call makeAndDisplayTiles to build and display the gameboard +- `makeAndDisplayTiles()` + - this function should empty the container that will hold the gameboard tiles + - it should clear the text in the info div + - it should create 10 new game tiles + - give them the class 'column' + - give them a 'data-value' attribute from each element of your tiles array. The output for an 'A' tile will look like `
` + - add the game tiles to the board + - then call a function that will add click events to each tile +- `addEventsToTiles()` + - should add click events to each of the gameboard tiles + - Each click event should call the makePlay function passing it the tile that was clicked. Strong hint: the tile that was clicked is `this` tile . . . Can you pass `this` as a parameter to the makePlay function? Test it out. +- `makePlay(tile)` + - this function should set the text of the current clicked tile to the value stored in the data attribute + - it should add a class of found to the tile + - it should add a class of clicked to the tile + - if the number of clicked tiles is 2, then it should check for a match +- `checkForMatch()` + - this should retrieve the data-value of the two clicked tiles + - if they are a match + - the 'clicked' class should be removed from the tiles + - the click event should be turned off for those tiles + - should check for a win + - if no match is found + - the text of the clicked cards should be set back to empty + - the found and clicked classes should both be removed + - BONUS: use setTimeout to keep your cards showing for a hot + moment. +*After you have the preceding functions working:* +- `checkForWin()` + - if the number of found tiles is 10 + - add a winning message to the info div + - remove the found class + - add a won class + +## START + +- add a click event to the start button, so that when it is clicked a new game is triggered. + diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css new file mode 100644 index 0000000..a415548 --- /dev/null +++ b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css @@ -0,0 +1,67 @@ +@import url(http://fonts.googleapis.com/css?family=Londrina+Shadow); +@import url(http://fonts.googleapis.com/css?family=Mystery+Quest); + +body { + background: url(http://subtlepatterns.com/images/transp_bg.png); +} +#content { + margin: 0 auto; + width: 360px; +} + +#header { + margin-bottom: 20px; +} + +#title { + font-family: 'Londrina Shadow', cursive; + font-size: 100px; +} + +button { + margin-bottom: 20px; +} + +.row { + clear: both; +} + +.column { + border: 1px solid #595139; + float: left; + font-family: 'Londrina Shadow', cursive; + font-size: 50px; + height: 65px; + margin: 5px; + text-align: center; + vertical-align: middle; + width: 50px; + transition: background-color 2s; +} + +.column:hover { + background-color: #A6977B; +} + +/* when two cards match apply this class to them*/ +.found { + background-color: #595139; + color: #FFFFFF; +} + +#info { + font-family: 'Londrina Shadow', cursive; + font-size: 50px; +} + +/* apply to every card when the user wins */ +.won { + background-color: #F2F0CE; + border: 1px solid #83A603; + color: #83A603; +} + +#timer { + font-family: 'Mystery Quest', cursive; + font-size: 20px; +} \ No newline at end of file diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html new file mode 100644 index 0000000..82773f5 --- /dev/null +++ b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html @@ -0,0 +1,21 @@ + + + + + Memory + + + +
+ + +
+ +
+
...
+
+ + + \ No newline at end of file diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js new file mode 100644 index 0000000..3163c78 --- /dev/null +++ b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js @@ -0,0 +1,70 @@ +window.onload = function() { + console.log('loaded'); + + // Invoke your chain of functions and listeners within window.onload + // var button = document.getElementsByTagName('button'); + // button.onclick(function(){ + // start(); + // }) +start(); +} + + +// USE THIS TO SHUFFLE YOUR ARRAYS +//o=array +var tiles = ['A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E', 'E']; +function shuffle(o) { + for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); + return o; +}; + +function start(){ + + shuffle(tiles); + makeAndDisplayTiles(); +} + +function makeAndDisplayTiles(){ + document.getElementById('game').innerHTML = ""; + document.getElementById('info').innerHTML = ""; + for(var i = 0; i 0){ + result+='#'; + stairs--; + } + result+='\n' + } + console.log(result); +} \ No newline at end of file From 715876ae45a1ecad6fb411b1886808866ceb87a7 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:07:16 -0400 Subject: [PATCH 3/8] readme file for memory homework --- unit_01/w02d04/homework/README_memory.md | 109 +++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 unit_01/w02d04/homework/README_memory.md diff --git a/unit_01/w02d04/homework/README_memory.md b/unit_01/w02d04/homework/README_memory.md new file mode 100644 index 0000000..42fcd74 --- /dev/null +++ b/unit_01/w02d04/homework/README_memory.md @@ -0,0 +1,109 @@ +# Memory! + +Tonight you are going to build the game called: [Memory](https://en.wikipedia.org/wiki/Concentration_(game)). We have provided you with a few starter files. You will look at the `index.html` to set up your physical board and cards, but write the code in your `app.js` file to get your game to work. + +Take it one step at a time. Follow these instructions to help get you going. + + +### You will need + +#### Data + +- an array of ten tiles + - your ten 'tiles' will represent the letter values that will be displayed on each DOM tile. eg. ['A', 'A', 'B', 'B', etc.] + +**Commit 1**
+
+The commit message should read:
+"Commit 1: Created an array to hold my ten game tiles" +
+ +#### Functions + +- `start()` + - shuffle the tiles array + - then call makeAndDisplayTiles to build and display the gameboard + +**Commit 2**
+
+The commit message should read:
+"Commit 2: Created start() function" +
+ +- `makeAndDisplayTiles()` + - this function should empty the container that will hold the gameboard tiles + - it should create 10 new game tiles + - give them the class 'column' + - give them a 'data-value' attribute from each element of your tiles array. Ex: The output for an 'A' tile will look like `
` + - add the game tiles to the board + - it should clear the text in the `info` div + - Lastly, it should then call a function that will add click events to each tile + +**Commit 3**
+
+The commit message should read:
+"Commit 3: Created makeAndDisplayTiles() function" +
+ +- `addEventsToTiles()` + - it should add click events to each of the gameboard tiles + - Each click event should call the makePlay function passing it the tile that was clicked. Strong hint: the tile that was clicked is `this` tile . . . Can you pass `this` as a parameter to the makePlay function? Test it out. + +**Commit 4**
+
+The commit message should read:
+"Commit 4: Created addEventsToTiles() function" +
+ +- `makePlay(tile)` + - this function should set the text of the current clicked tile to the value stored in the data attribute + - it should add a class of found to the tile + - it should add a class of clicked to the tile + - if the number of clicked tiles is 2, then it should check for a match + +**Commit 5**
+
+The commit message should read:
+"Commit 5: Created makePlay(tile)" +
+ +- `checkForMatch()` + - this should retrieve the data-value of the two clicked tiles + - if they are a match + - the 'clicked' class should be removed from the tiles + - the click event should be turned off for those tiles + - should check for a win + - if no match is found + - the text of the clicked cards should be set back to empty + - the found and clicked classes should both be removed + - BONUS: use setTimeout to keep your cards showing for a hot + moment. + +**Commit 6**
+
+The commit message should read:
+"Commit 6: Created checkForMatch() function" +
+ +*After you have the preceding functions working:* +- `checkForWin()` + - if the number of found tiles is 10 + - add a winning message to the info div + - remove the found class + - add a won class + +**Commit 7**
+
+The commit message should read:
+"Commit 7: Created checkForWin() function" +
+ +## START + +- add a click event to the start button, so that when it is clicked a new game is triggered. + +**Commit 8**
+
+The commit message should read:
+"Commit 8: Added a click event to the start button to start a new game" +
From 3a5b50d7b2906c04e5993326634aa8bd60ff5d32 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:21:49 -0400 Subject: [PATCH 4/8] Update README_memory.md --- unit_01/w02d04/homework/README_memory.md | 36 +++++++++--------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/unit_01/w02d04/homework/README_memory.md b/unit_01/w02d04/homework/README_memory.md index 42fcd74..904a3e5 100644 --- a/unit_01/w02d04/homework/README_memory.md +++ b/unit_01/w02d04/homework/README_memory.md @@ -31,12 +31,14 @@ The commit message should read:

- `makeAndDisplayTiles()` - - this function should empty the container that will hold the gameboard tiles - - it should create 10 new game tiles - - give them the class 'column' + - it should create 10 new game tiles (you will want to use a loop to create these tiles) + - give them the class 'column' - give them a 'data-value' attribute from each element of your tiles array. Ex: The output for an 'A' tile will look like `
` + - it should add click events to each of the gameboard tiles + - Each click event should call the makePlay function passing it the tile that was clicked. Strong hint: the tile that was clicked is `this` tile . . . Can you pass `this` as a parameter to the makePlay function? Test it out. - add the game tiles to the board - - it should clear the text in the `info` div + - it should clear the text in the `info` div + - this function should empty the container that will hold the gameboard tiles - Lastly, it should then call a function that will add click events to each tile **Commit 3**
@@ -45,26 +47,16 @@ The commit message should read:
"Commit 3: Created makeAndDisplayTiles() function"
-- `addEventsToTiles()` - - it should add click events to each of the gameboard tiles - - Each click event should call the makePlay function passing it the tile that was clicked. Strong hint: the tile that was clicked is `this` tile . . . Can you pass `this` as a parameter to the makePlay function? Test it out. - -**Commit 4**
-
-The commit message should read:
-"Commit 4: Created addEventsToTiles() function" -
- - `makePlay(tile)` - this function should set the text of the current clicked tile to the value stored in the data attribute - it should add a class of found to the tile - it should add a class of clicked to the tile - if the number of clicked tiles is 2, then it should check for a match -**Commit 5**
+**Commit 4**

The commit message should read:
-"Commit 5: Created makePlay(tile)" +"Commit 4: Created makePlay(tile)"
- `checkForMatch()` @@ -79,10 +71,10 @@ The commit message should read:
- BONUS: use setTimeout to keep your cards showing for a hot moment. -**Commit 6**
+**Commit 5**

The commit message should read:
-"Commit 6: Created checkForMatch() function" +"Commit 5: Created checkForMatch() function"
*After you have the preceding functions working:* @@ -92,18 +84,18 @@ The commit message should read:
- remove the found class - add a won class -**Commit 7**
+**Commit 6**

The commit message should read:
-"Commit 7: Created checkForWin() function" +"Commit 6: Created checkForWin() function"
## START - add a click event to the start button, so that when it is clicked a new game is triggered. -**Commit 8**
+**Commit 7**

The commit message should read:
-"Commit 8: Added a click event to the start button to start a new game" +"Commit 7: Added a click event to the start button to start a new game"
From a585595e98c0107526f22c645610355fe4da6cfe Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:25:28 -0400 Subject: [PATCH 5/8] removed memory starter modified folder --- .../memory_starter/README.md | 57 --------------- .../memory_starter/css/style.css | 67 ------------------ .../memory_starter/index.html | 21 ------ .../memory_starter/js/app.js | 70 ------------------- 4 files changed, 215 deletions(-) delete mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md delete mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css delete mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html delete mode 100644 unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md deleted file mode 100644 index 6e09bd0..0000000 --- a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Memory! - -Tonight you are going to build the game called: [Memory](https://en.wikipedia.org/wiki/Concentration_(game)). We have provided you with a few starter files. You will look at the `index.html` to set up your physical board and cards, but write the code in your `app.js` file to get your game to work. - -Take it one step at a time. Follow these instructions to help get you going. - - -### You will need - -#### Data - -- an array of ten tiles - - your ten 'tiles' will represent the letter values that will be displayed on each DOM tile. eg. ['A', 'A', 'B', 'B', etc.] - -#### Functions - -- `start()` - - shuffle the tiles array - - then call makeAndDisplayTiles to build and display the gameboard -- `makeAndDisplayTiles()` - - this function should empty the container that will hold the gameboard tiles - - it should clear the text in the info div - - it should create 10 new game tiles - - give them the class 'column' - - give them a 'data-value' attribute from each element of your tiles array. The output for an 'A' tile will look like `
` - - add the game tiles to the board - - then call a function that will add click events to each tile -- `addEventsToTiles()` - - should add click events to each of the gameboard tiles - - Each click event should call the makePlay function passing it the tile that was clicked. Strong hint: the tile that was clicked is `this` tile . . . Can you pass `this` as a parameter to the makePlay function? Test it out. -- `makePlay(tile)` - - this function should set the text of the current clicked tile to the value stored in the data attribute - - it should add a class of found to the tile - - it should add a class of clicked to the tile - - if the number of clicked tiles is 2, then it should check for a match -- `checkForMatch()` - - this should retrieve the data-value of the two clicked tiles - - if they are a match - - the 'clicked' class should be removed from the tiles - - the click event should be turned off for those tiles - - should check for a win - - if no match is found - - the text of the clicked cards should be set back to empty - - the found and clicked classes should both be removed - - BONUS: use setTimeout to keep your cards showing for a hot - moment. -*After you have the preceding functions working:* -- `checkForWin()` - - if the number of found tiles is 10 - - add a winning message to the info div - - remove the found class - - add a won class - -## START - -- add a click event to the start button, so that when it is clicked a new game is triggered. - diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css deleted file mode 100644 index a415548..0000000 --- a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/css/style.css +++ /dev/null @@ -1,67 +0,0 @@ -@import url(http://fonts.googleapis.com/css?family=Londrina+Shadow); -@import url(http://fonts.googleapis.com/css?family=Mystery+Quest); - -body { - background: url(http://subtlepatterns.com/images/transp_bg.png); -} -#content { - margin: 0 auto; - width: 360px; -} - -#header { - margin-bottom: 20px; -} - -#title { - font-family: 'Londrina Shadow', cursive; - font-size: 100px; -} - -button { - margin-bottom: 20px; -} - -.row { - clear: both; -} - -.column { - border: 1px solid #595139; - float: left; - font-family: 'Londrina Shadow', cursive; - font-size: 50px; - height: 65px; - margin: 5px; - text-align: center; - vertical-align: middle; - width: 50px; - transition: background-color 2s; -} - -.column:hover { - background-color: #A6977B; -} - -/* when two cards match apply this class to them*/ -.found { - background-color: #595139; - color: #FFFFFF; -} - -#info { - font-family: 'Londrina Shadow', cursive; - font-size: 50px; -} - -/* apply to every card when the user wins */ -.won { - background-color: #F2F0CE; - border: 1px solid #83A603; - color: #83A603; -} - -#timer { - font-family: 'Mystery Quest', cursive; - font-size: 20px; -} \ No newline at end of file diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html deleted file mode 100644 index 82773f5..0000000 --- a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Memory - - - -
- - -
- -
-
...
-
- - - \ No newline at end of file diff --git a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js b/unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js deleted file mode 100644 index 3163c78..0000000 --- a/unit_01/w02d04/homework/memory_starter_modified/memory_starter/js/app.js +++ /dev/null @@ -1,70 +0,0 @@ -window.onload = function() { - console.log('loaded'); - - // Invoke your chain of functions and listeners within window.onload - // var button = document.getElementsByTagName('button'); - // button.onclick(function(){ - // start(); - // }) -start(); -} - - -// USE THIS TO SHUFFLE YOUR ARRAYS -//o=array -var tiles = ['A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E', 'E']; -function shuffle(o) { - for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); - return o; -}; - -function start(){ - - shuffle(tiles); - makeAndDisplayTiles(); -} - -function makeAndDisplayTiles(){ - document.getElementById('game').innerHTML = ""; - document.getElementById('info').innerHTML = ""; - for(var i = 0; i 0){ - result+='#'; - stairs--; - } - result+='\n' - } - console.log(result); -} \ No newline at end of file From 79bc944525361219f404d797b77424476c7efb69 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:27:34 -0400 Subject: [PATCH 6/8] Update README_memory.md --- unit_01/w02d04/homework/README_memory.md | 1 - 1 file changed, 1 deletion(-) diff --git a/unit_01/w02d04/homework/README_memory.md b/unit_01/w02d04/homework/README_memory.md index 904a3e5..45fac0f 100644 --- a/unit_01/w02d04/homework/README_memory.md +++ b/unit_01/w02d04/homework/README_memory.md @@ -39,7 +39,6 @@ The commit message should read:
- add the game tiles to the board - it should clear the text in the `info` div - this function should empty the container that will hold the gameboard tiles - - Lastly, it should then call a function that will add click events to each tile **Commit 3**

From 3b2c1768d43d90a84c47b5861c74f122d0fc315c Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:39:41 -0400 Subject: [PATCH 7/8] Update README_memory.md --- unit_01/w02d04/homework/README_memory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit_01/w02d04/homework/README_memory.md b/unit_01/w02d04/homework/README_memory.md index 45fac0f..a4c8ce9 100644 --- a/unit_01/w02d04/homework/README_memory.md +++ b/unit_01/w02d04/homework/README_memory.md @@ -50,7 +50,7 @@ The commit message should read:
- this function should set the text of the current clicked tile to the value stored in the data attribute - it should add a class of found to the tile - it should add a class of clicked to the tile - - if the number of clicked tiles is 2, then it should check for a match + - if the number of clicked tiles is 2, then it should check for a match (hint: You might want to make an array to hold your `clicked` items. Check the length of the array of clicked items... if it's 2, you're good to go!). **Commit 4**

From 1c4f36c38b129e9aa8d1da1c6bf0f9f1132eb2c1 Mon Sep 17 00:00:00 2001 From: Kristyn Bryan Date: Wed, 25 May 2016 18:40:15 -0400 Subject: [PATCH 8/8] Update README_memory.md --- unit_01/w02d04/homework/README_memory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit_01/w02d04/homework/README_memory.md b/unit_01/w02d04/homework/README_memory.md index a4c8ce9..6120638 100644 --- a/unit_01/w02d04/homework/README_memory.md +++ b/unit_01/w02d04/homework/README_memory.md @@ -50,7 +50,7 @@ The commit message should read:
- this function should set the text of the current clicked tile to the value stored in the data attribute - it should add a class of found to the tile - it should add a class of clicked to the tile - - if the number of clicked tiles is 2, then it should check for a match (hint: You might want to make an array to hold your `clicked` items. Check the length of the array of clicked items... if it's 2, you're good to go!). + - if the number of clicked tiles is 2, then it should check for a match (hint: You might want to make an array to hold your clicked tiles. Check the length of the array of clicked items... if it's 2, you're good to go!). **Commit 4**