Implement addVotes
Showing
1 changed file
with
8 additions
and
1 deletions
... | @@ -82,7 +82,14 @@ | ... | @@ -82,7 +82,14 @@ |
82 | candidate.votes.push(i); | 82 | candidate.votes.push(i); |
83 | } | 83 | } |
84 | }; | 84 | }; |
85 | RelativePlacement.prototype.addVotes = function () {}; | 85 | |
86 | /** | ||
87 | * | ||
88 | * @param {String[][]} votes | ||
89 | */ | ||
90 | RelativePlacement.prototype.addVotes = function (votes) { | ||
91 | votes.forEach(vote => this.addVote(vote)); | ||
92 | }; | ||
86 | RelativePlacement.prototype.getResult = function () { | 93 | RelativePlacement.prototype.getResult = function () { |
87 | return relativePlacement(this.votes, this.candidateList); | 94 | return relativePlacement(this.votes, this.candidateList); |
88 | }; | 95 | }; | ... | ... |
-
Please register or sign in to post a comment