From 77ca7ec5366e90f136b3113d2158b495f97ec066 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 30 Sep 2017 17:37:49 -0400 Subject: [PATCH] Fix deckWidth->deckHeight typo --- js/playfield.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/playfield.js b/js/playfield.js index fb84bc7..d0fccfc 100644 --- a/js/playfield.js +++ b/js/playfield.js @@ -224,8 +224,8 @@ function makeCard(cardNum) { card.style.backgroundPositionX = -(cardNum % deckWidth) * parseInt(style.getPropertyValue("width")) + "px"; card.style.backgroundPositionY = - -Math.floor(cardNum/deckHeight) * parseInt(style.getPropertyValue("height")) + "px"; card.style.backgroundImage = "url('deck.png')"; + -Math.floor(cardNum/deckWidth) * parseInt(style.getPropertyValue("height")) + "px"; card.style.backgroundSize = `${deckWidth * 100}% ${deckHeight * 100}%`; document.body.removeChild(card);