Displaying 1 result from an estimated 1 matches for "per_geslacht".
2008 Jan 05
4
a sort question
...gender? geslacht
@geslacht = geslacht
end
I know you could solve it like the example below however I would like to
do it with an IF structure or with a bubble sort but not able to figure
this out
could someone help me out here and give me an example on how to solve
this
def self.top3 geslacht
per_geslacht(geslacht).sort_by { |x| x.score
}.to_a.slice(-3,3).reverse
end
when it''s an if structure
I should start somehow with
if speler.score1 > speler.score2
print speler.score1
else
print speler.score2
but after this I,m lost since I don''t know how to difference the first
person fr...