From 8934c35cc2e21f4b5be362e7a0750942e1e897c7 Mon Sep 17 00:00:00 2001 From: Thayol Date: Tue, 29 Jun 2021 22:40:49 +0200 Subject: [PATCH] Include initial state of auto-draw. --- script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 4923308..67995dd 100644 --- a/script.js +++ b/script.js @@ -42,8 +42,10 @@ var deckElement = document.getElementById('deck'); var handElement = document.getElementById('hand'); var recommendElement = document.getElementById('result'); var pointsElement = document.getElementById('points'); +var autoDrawElement = document.getElementById('autoDrawToggle'); reset(); +toggleAutoDraw(autoDrawElement); function toggleAutoDraw(element) { if (element.checked) { @@ -242,7 +244,6 @@ function drawCard(cardId, thisHand = null, thisDeck = null) { } function recommend() { - var cardCount = Object.keys(allCards).length recommendOfDepth(defaultDepth); updateUI(true); }