MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / cardo

Function cardo

assets/js/makeMatchGame.js:237–255  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

235};
236
237function cardo(event)
238{
239 if(index==-1){
240 alert("select anyone game dimension first- 4X4, 4X6, 4X8, 6X8");
241 return;}
242 const clas = event.target.className;
243 if(clas!="disable" && clas!="selected"){
244 if(clas=="four-same"&& (index==2 || index==3)){
245 match=4;
246 event.target.classList.add("selected");
247 document.getElementsByClassName("two-same")[0].classList.add("disable"); }
248 else{
249 match=2;
250 document.getElementsByClassName("four-same")[0].classList.add("disable");}
251 if(clas=="four-same"&& (index==0 || index==1))
252 alert("4 card game is for 4X8 and 6X8");
253 }
254
255};
256
257function addDesign(event){
258 if(index==-1){

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected