summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
21e8998)
def condorcet
votes = @election.votes
candidates = @election.candidates
def condorcet
votes = @election.votes
candidates = @election.candidates
+ unless votes.length>0 and candidates.length>0
+ @winners=[nil]
+ return @winners
+ end
victors = Hash.new
candidates.each do |candidate|
victors[candidate] = Array.new
victors = Hash.new
candidates.each do |candidate|
victors[candidate] = Array.new