Prisoner of the Chrysanthemum Throne, Charles Laval & Photoelasticity

This commit is contained in:
nik gaffney 2020-11-18 01:23:51 +01:00
parent 6c6d701ea6
commit 16899a2607
2 changed files with 12 additions and 12 deletions

View file

@ -158,7 +158,7 @@ var Deck = (function () {
// calculate rank/suit, etc.. // calculate rank/suit, etc..
var rank = i % 26 + 1; var rank = i % 26 + 1;
var suit = i / 26 | 0; var suit = i / 2 | 0;
var z = (52 - i) / 2; var z = (52 - i) / 2;
// create elements // create elements
@ -168,7 +168,7 @@ var Deck = (function () {
// states // states
var isDraggable = false; var isDraggable = false;
var isFlippable = false; var isFlippable = true;
// self = card // self = card
var self = { i: i, rank: rank, suit: suit, pos: i, $el: $el, mount: mount, unmount: unmount, setSide: setSide }; 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; self.rot = 0;
// set default side to back // set default side to back
self.setSide('back'); self.setSide('face'); // 'back'
// add drag/click listeners // add drag/click listeners
addListener($el, 'mousedown', onMousedown); addListener($el, 'mousedown', onMousedown);

View file

@ -160,17 +160,17 @@ deck.sort()
var randomDelay = 10000 + 30000 * Math.random() var randomDelay = 10000 + 30000 * Math.random()
setTimeout(function () { // setTimeout(function () {
printMessage('Psst..I want to share a secret with you...') // printMessage('Psst..I want to share a secret with you...')
}, randomDelay) // }, randomDelay)
setTimeout(function () { // setTimeout(function () {
printMessage('...try clicking all kings and nothing in between...') // printMessage('...try clicking all kings and nothing in between...')
}, randomDelay + 5000) // }, randomDelay + 5000)
setTimeout(function () { // setTimeout(function () {
printMessage('...have fun ;)') // printMessage('...have fun ;)')
}, randomDelay + 10000) // }, randomDelay + 10000)
function printMessage (text) { function printMessage (text) {
var animationFrames = Deck.animationFrames var animationFrames = Deck.animationFrames