-
Notifications
You must be signed in to change notification settings - Fork 30
Modules
Johan Lindskogen edited this page Dec 2, 2015
·
1 revision
createVoteSession(candidateNames, vacantEnabled, maxCandidates)
constructor(candidates, vacantCandidates, maximumNbrOfVotes)
closeVotingSession()
createEmptyVoteResults(candidates, vacantCandidates)
castVote(vote)
validateVote(vote)
isValidAmountOfVotes(vote)
allVotesUnique(vote)
checkIfAllCandidatesInVoteAreValid(vote)
isVacantVotesInIncreasingIndex(vote, voteCount)
increaseVoteForCandidate(candidateIndex)
countVotes(votesCount, maximumNbrOfVotes)
groupByVoteValue(votesCount)
concatWithCandidates(candidates, spots)
pickWinnersWhenSameVoteCount(candidates, spots)
moveFromArrayUntilLength(fromArray, toArray, length)
isVacant(item)
nextSession()
generateCodes(nbrOfUsers, nbrOfCodesPerUser, lengthOfCodes)
currentSessionCodes()
isValidCode(code)
invalidateCode(code)