From 16899a2607a296b36980bd008556ccce00e0d375 Mon Sep 17 00:00:00 2001 From: nik gaffney Date: Wed, 18 Nov 2020 01:23:51 +0100 Subject: [PATCH] Prisoner of the Chrysanthemum Throne, Charles Laval & Photoelasticity --- web/shuffle/deck.js | 6 +++--- web/shuffle/example.js | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web/shuffle/deck.js b/web/shuffle/deck.js index f7d59f9..818a7e4 100644 --- a/web/shuffle/deck.js +++ b/web/shuffle/deck.js @@ -158,7 +158,7 @@ var Deck = (function () { // calculate rank/suit, etc.. var rank = i % 26 + 1; - var suit = i / 26 | 0; + var suit = i / 2 | 0; var z = (52 - i) / 2; // create elements @@ -168,7 +168,7 @@ var Deck = (function () { // states var isDraggable = false; - var isFlippable = false; + var isFlippable = true; // self = card var self = { i: i, rank: rank, suit: suit, pos: i, $el: $el, mount: mount, unmount: unmount, setSide: setSide }; @@ -190,7 +190,7 @@ var Deck = (function () { self.rot = 0; // set default side to back - self.setSide('back'); + self.setSide('face'); // 'back' // add drag/click listeners addListener($el, 'mousedown', onMousedown); diff --git a/web/shuffle/example.js b/web/shuffle/example.js index e883829..f185743 100644 --- a/web/shuffle/example.js +++ b/web/shuffle/example.js @@ -160,17 +160,17 @@ deck.sort() var randomDelay = 10000 + 30000 * Math.random() -setTimeout(function () { - printMessage('Psst..I want to share a secret with you...') -}, randomDelay) +// setTimeout(function () { +// printMessage('Psst..I want to share a secret with you...') +// }, randomDelay) -setTimeout(function () { - printMessage('...try clicking all kings and nothing in between...') -}, randomDelay + 5000) +// setTimeout(function () { +// printMessage('...try clicking all kings and nothing in between...') +// }, randomDelay + 5000) -setTimeout(function () { - printMessage('...have fun ;)') -}, randomDelay + 10000) +// setTimeout(function () { +// printMessage('...have fun ;)') +// }, randomDelay + 10000) function printMessage (text) { var animationFrames = Deck.animationFrames