diff --git a/.drone.yml b/.drone.yml index dc1207c..d365e34 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,4 +28,13 @@ steps: COMMAND: create OVERWRITE: true ADMINS: aurianjault,raphaellacote,bastienjacquelin,remiarnal - depends_on : [hyperset-build] \ No newline at end of file + depends_on : [hyperset-build] + + - name: code-analysis + image: sonarsource/sonar-scanner-cli + environment: + SONAR_TOKEN: + from_secret: SONAR_TOKEN + commands: + - sonar-scanner -Dsonar.projectKey=hyperset -Dsonar.sources=. -Dsonar.host.url=https://codefirst.iut.uca.fr/sonar -Dsonar.login=$${SONAR_TOKEN} + depends_on: [ hyperset-build ] \ No newline at end of file diff --git a/src/algo.js b/src/algo.js index c4e8740..c3da01b 100644 --- a/src/algo.js +++ b/src/algo.js @@ -1,62 +1,10 @@ -// Pseudo code -// -/* - * function checkReslt(array ) - * { - * new array> matrice = vide - * - * forEach(array: value) - * { - * matrice.add(value.getAttrib) - * } - * Check all length of matrice - * for(i = 0; i tab - * for (j=0; j { attributesMatrix.push(element.getAttributes()); }); @@ -110,3 +58,72 @@ function checkAttributes(attributes){ }); return boolLoop === true; } + +// The digit refere to the number of cards required to make a set +// +function numberOfSets3(deck){ + let res = 0 + for(i=0;i