function resetGame() {
    YOU["score"] = 0;
    YOU["standing"] = false; // If you pressed stand, then you wont be able to pick more cards. Needed in order to make the game finish if no one is on "bust" state
    YOU["hand"] = [];
    document.getElementById("game__box-player").innerHTML = "";
    document.querySelector(YOU["scoreSpan"]).textContent = " " + YOU["score"];
    document.querySelector(YOU["scoreSpan"]).style.color = "black";

    DEALER["score"] = 0;
    DEALER["hand"] = [];
    document.getElementById("game__box-dealer").innerHTML = "";
    document.querySelector(DEALER["scoreSpan"]).textContent = " " + DEALER["score"];
    document.querySelector(DEALER["scoreSpan"]).style.color = "black";
}
// resetGame: restarts the game, function called every dealButton()
restarts the game, function called every dealButton()
restarts the game function called every dealButton ()
function resetGame() {
    YOU["score"] = 0;
    YOU["standing"] = false; 
    YOU["hand"] = [];
    document.getElementById("game__box-player").innerHTML = "";
    document.querySelector(YOU["scoreSpan"]).textContent = " " + YOU["score"];
    document.querySelector(YOU["scoreSpan"]).style.color = "black";
    DEALER["score"] = 0;
    DEALER["hand"] = [];
    document.getElementById("game__box-dealer").innerHTML = "";
    document.querySelector(DEALER["scoreSpan"]).textContent = " " + DEALER["score"];
    document.querySelector(DEALER["scoreSpan"]).style.color = "black";
}
function resetGame ( ) { YOU [ "score" ] = 0 ; YOU [ "standing" ] = false ; YOU [ "hand" ] = [ ] ; document . getElementById ( "game__box-player" ) . innerHTML = "" ; document . querySelector ( YOU [ "scoreSpan" ] ) . textContent = " " + YOU [ "score" ] ; document . querySelector ( YOU [ "scoreSpan" ] ) . style . color = "black" ; DEALER [ "score" ] = 0 ; DEALER [ "hand" ] = [ ] ; document . getElementById ( "game__box-dealer" ) . innerHTML = "" ; document . querySelector ( DEALER [ "scoreSpan" ] ) . textContent = " " + DEALER [ "score" ] ; document . querySelector ( DEALER [ "scoreSpan" ] ) . style . color = "black" ; }
resetGame: restarts the game, function called every dealButton()
resetGame : restarts the game function called every dealButton ()
// If you pressed stand, then you wont be able to pick more cards. Needed in order to make the game finish if no one is on "bust" state