Commit 9e3be20b 9e3be20b926efb9e54e855a9fbb416bdee65aedf by Vincent Peybernes

Implement addVotes

1 parent 71555bf1
Pipeline #16 for 9e3be20b failed in 21 seconds
......@@ -82,7 +82,14 @@
candidate.votes.push(i);
}
};
RelativePlacement.prototype.addVotes = function () {};
/**
*
* @param {String[][]} votes
*/
RelativePlacement.prototype.addVotes = function (votes) {
votes.forEach(vote => this.addVote(vote));
};
RelativePlacement.prototype.getResult = function () {
return relativePlacement(this.votes, this.candidateList);
};
......