summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d28621e)
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=[]
- return @winners
+
+ unless votes.length > 0 and candidates.length > 0
+ return @winners=[]
victors = Hash.new
candidates.each do |candidate|
victors[candidate] = Array.new
victors = Hash.new
candidates.each do |candidate|
victors[candidate] = Array.new