June 2015
Beginner
354 pages
8h 23m
English
Carry out the following steps:
matchgame.js JavaScript file.ready function, we used the saved order of the deck in the previous game instead of shuffling a new deck. Add the following highlighted code in the jQuery ready function:$(document).ready(function(){
// reset the elapsed time to 0.
matchingGame.elapsedTime = 0;
// start the timer
matchingGame.timer = setInterval(countTimer, 1000);
// shuffling the deck
matchingGame.deck.sort(shuffle);
// re-create the saved deck
var savedObject = savedSavingObject();
if (savedObject !== undefined) {
matchingGame.deck = savedObject.deck;
}
// copying the deck into saving object. matchingGame.savingObject.deck = ...Read now
Unlock full access