function initGame() {
  console.log('game inititing');
  //game finished count should always be 0 when initiating the game
  gameFinishedCount = 0;
  const cards = document.querySelectorAll('.card');
  const cardsArray = $(".card");
  cards.forEach(card => card.addEventListener('click', flipTheCard));
  shuffleCards(cardsArray);
  randomizeImageSrc();
  console.log('game initiated');
}
/* INITIATE THE GAME ON PAGE LOAD */
INITIATE THE GAME ON PAGE LOAD
INITIATE THE GAME ON PAGE LOAD
function initGame() {
  console.log('game inititing');
  gameFinishedCount = 0;
  const cards = document.querySelectorAll('.card');
  const cardsArray = $(".card");
  cards.forEach(card => card.addEventListener('click', flipTheCard));
  shuffleCards(cardsArray);
  randomizeImageSrc();
  console.log('game initiated');
}
function initGame ( ) { console . log ( 'game inititing' ) ; gameFinishedCount = 0 ; const cards = document . querySelectorAll ( '.card' ) ; const cardsArray = $ ( ".card" ) ; cards . forEach ( card => card . addEventListener ( 'click' , flipTheCard ) ) ; shuffleCards ( cardsArray ) ; randomizeImageSrc ( ) ; console . log ( 'game initiated' ) ; }
INITIATE THE GAME ON PAGE LOAD
INITIATE THE GAME ON PAGE LOAD
//game finished count should always be 0 when initiating the game