diff --git a/src/Model/Const.js b/src/Model/Const.js index 858eec3..200c05d 100755 --- a/src/Model/Const.js +++ b/src/Model/Const.js @@ -15,8 +15,8 @@ const SHAPE_PATH = { }; const OUTLINE_SPEC = { - full: {}, - dot: { "stroke-dasharray": "1 20", "stroke-linecap": "round" }, + continuous: {}, + dot: { "stroke-dasharray": "1 25", "stroke-linecap": "round" }, rect: { "stroke-dasharray": 70 }, spade: { "stroke-dasharray": "10 15", "stroke-width": 40 }, sharp: {} diff --git a/src/Model/card-to-html.js b/src/Model/card-to-html.js index e5bbb1f..fdf6b76 100755 --- a/src/Model/card-to-html.js +++ b/src/Model/card-to-html.js @@ -10,6 +10,10 @@ class CardToHtml { svg.setAttribute('height','160'); svg.setAttribute('width','80'); svg.setAttribute('viewBox','0 0 200 400'); + + if(card.attributes['number'] == undefined){ + card.attributes['number'] = 1; + } // Create paths + add to svg for(let j = 0; j < 2; j++) { @@ -31,14 +35,9 @@ class CardToHtml { // The way to create svg element (differs from html element) const path = document.createElementNS("http://www.w3.org/2000/svg", "path"); - if(shape === null) shape = 'oval'; - if(color === null) color = '000000'; - if(filling === null) filling = 'fill'; - - // console.log("shape: " + shape); - // console.log("color: " + color); - // console.log("filling: " + filling); - // console.log("outline: " + outline); + if(shape === undefined) shape = 'oval'; + if(color === undefined) color = 'black'; + if(filling === undefined) filling = 'none'; // Add lots of attributes path.setAttribute("d",SHAPE_PATH[shape]); diff --git a/src/algo.js b/src/algo.js index bcc7e7b..dbb853c 100755 --- a/src/algo.js +++ b/src/algo.js @@ -82,7 +82,7 @@ function numberOfSets4(deck){ for(j = i+1 ; j < deck.length - 2; j++){ for(k = j+1 ; k < deck.length - 1 ; k++){ for(l = k + 1 ; l < deck.length;l++){ - if(isSet([deck[i],deck[j],deck[k]])){ + if(isSet([deck[i],deck[j],deck[k],deck[l]])){ //console.log(deck[i],deck[j],deck[k],deck[l]) res += 1 } @@ -100,7 +100,7 @@ function numberOfSets5(deck){ for(k = j+1 ; k < deck.length - 2 ; k++){ for(l = k + 1 ; l < deck.length - 1;l++){ for(m = l + 1; m \ No newline at end of file diff --git a/views/deck-module.js b/views/deck-module.js index d93e296..566b44d 100644 --- a/views/deck-module.js +++ b/views/deck-module.js @@ -65,7 +65,7 @@ export default{

Players: {{connected}}

-
+