21: Shuffle

21: Shuffle

if(action=='Shuffle'){ document.getElementById('gameStatus').innerHTML = "<em>Shuffling...</em>";      // reset current score and empty the list of cards drawn current_score = 0; document.getElementById('cardsDrawn').innerHTML = '<em>Your Cards Drawn Will Appear Here</em>'; document.getElementById('scores').innerHTML = '<strong>HIGH SCORE:</strong> ' + high_score + '<br><strong>Current Score:</strong> '+current_score;      // RESET THE DECK Suits = ['Clubs','Hearts','Spades','Diamonds'];      // specify 'DealAgain' in the array in case a 0 is rolled  Clubs = ['DealAgain','Ace','2','3','4','5','6','7','8','9','10','Jack','Queen','King']; Hearts = ['DealAgain','Ace','2','3','4','5','6','7','8','9','10','Jack','Queen','King']; Spades = ['DealAgain','Ace','2','3','4','5','6','7','8','9','10','Jack','Queen','King']; Diamonds = ['DealAgain','Ace','2','3','4','5','6','7','8','9','10','Jack','Queen','King'];      // set up an array to store which cards the player has in front of them CardsDealt = [];      document.getElementById('gameStatus').innerHTML = "Cards Shuffled. Let's Play!";}
Comments are closed.