votes = @election.votes
candidates = @election.candidates
unless votes.length>0 and candidates.length>0
- @winners=[nil]
+ @winners=[]
return @winners
end
victors = Hash.new
def cpssd
votes = @election.votes
candidates = *@election.candidates
-
+
def in_schwartz_set?(candidate, candidates, transitive_defeats)
candidates.each do |challenger|
next if candidate == challenger