From f0fcd0da22e1ce2d6ed8f6e47756baf76518a434 Mon Sep 17 00:00:00 2001 From: DonRenando Date: Tue, 10 Mar 2015 15:09:33 +0100 Subject: [PATCH] retour ligne et centre memory --- SRC/public/css/memory.css | 9 ++++++--- SRC/public/js/memory.js | 11 ++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/SRC/public/css/memory.css b/SRC/public/css/memory.css index 92528e6..5c41d15 100644 --- a/SRC/public/css/memory.css +++ b/SRC/public/css/memory.css @@ -167,14 +167,17 @@ img { */ .mg__wrapper { margin: 0 auto; + margin: 0; + padding: 0; width: 100%; + text-align: center; } .mg__contents { position: relative; - padding-bottom: 47%; - margin-left: -5px; - margin-right: -5px; + padding-bottom: 50%; + margin-left: 35%; + margin-right: 0; } /** diff --git a/SRC/public/js/memory.js b/SRC/public/js/memory.js index 878c53c..82442fd 100644 --- a/SRC/public/js/memory.js +++ b/SRC/public/js/memory.js @@ -304,18 +304,19 @@ this.newCards.push(this.cards[i], this.cards[i]); } this.newCards = shuffle(this.newCards); - /* this.newCards.push(0, 0); - this.newCards.push(0, 0);*/ + this.tilesHTML = ''; + var n = 0; for ( var i = 0; i < this.numTiles; i++ ) { - var n = i + 1; - //this.tilesHTML += '
'; + n = n + 1; + if(this.level == 3 && n == 5 ){n = 9} + if(this.level == 2 && n == 4 ){n = 7} this.tilesHTML += '
\
\ \ '; this.tilesHTML +='
'; - // this.tilesHTML +='
'; + /* if(this.level == 1 && n == 2){ this.tilesHTML +="";