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

Function showCard

blackjackgame/blackjack.js:70–80  ·  view source on GitHub ↗
(card, activePlayer)

Source from the content-addressed store, hash-verified

68}
69
70function showCard(card, activePlayer){
71 if(activePlayer.result <= 21){
72 let cardImage = document.createElement('img');
73 cardImage.style.width = "100px";
74 cardImage.style.height = "150px";
75 cardImage.style.padding = "10px";
76 cardImage.src = `images/${card}.png`;
77 document.querySelector(activePlayer['div']).appendChild(cardImage);
78 hitSound.play();
79 }
80}
81
82function reset(){
83 const imagesList = document.querySelector('.flex-blackjack-row-1').querySelectorAll('img');

Callers 2

blackjackHitFunction · 0.85
blackjackStandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected