We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b2be53 commit 07bcdc9Copy full SHA for 07bcdc9
Intermediate_JavaScript/GamePlay_setup_Values.html
@@ -103,6 +103,10 @@
103
message.innerHTML = "Match Found";
104
cardFlipped = -1;
105
playLockout = false;
106
+ // Conclude the game
107
+ if (tfo.length == tileArray.length) {
108
+ gameover();
109
+ }
110
} else {
111
message.innerHTML = "No Match";
112
timer = setInterval(hideCard, 1000);
@@ -117,6 +121,15 @@
117
121
}
118
122
119
123
124
+ function gameover() {
125
+ message.innerHTML = "GAME OVER";
126
+ sb.style.display = "block";
127
+ gamePlay = false;
128
+ tfo = [];
129
+ tileImages = [];
130
+ gameBoard.innerHTML = "";
131
132
+
120
133
function isinArray(v, array) {
134
return array.indexOf(v) > -1;
135
0 commit comments