MCPcopy Create free account
hub / github.com/codemistic/Web-Development / flip

Function flip

Picture_Bingo_Game/index.js:5–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3 let firstCard,secondCard;
4 let lock= false;
5function flip(){
6 if(lock)return;
7 if(this===firstCard)return;
8 this.classList.add('flipping');
9
10 if(!isClicked){
11 isClicked=true;
12 firstCard=this;
13 }
14 else {
15 secondCard=this;
16
17 checkIfMatch();
18
19 }
20
21
22}
23function checkIfMatch(){
24 if(firstCard.dataset.framework===secondCard.dataset.framework){
25 disableFlip();

Callers

nothing calls this directly

Calls 1

checkIfMatchFunction · 0.85

Tested by

no test coverage detected