summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-27 02:33:28 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-27 02:33:28 -0400
commit5301997c80401e0fa5d106dd4dbcd330b4708cfb (patch)
tree04841a2f16791d9213c58b19ec612fc5fbaf651f /lib
parent79b903fc5632242a6ab1ee0f7732dec168331703 (diff)
Added a standings view and used spaceships.
Diffstat (limited to 'lib')
-rw-r--r--lib/seeding/fair_ranked_seeding.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/seeding/fair_ranked_seeding.rb b/lib/seeding/fair_ranked_seeding.rb
index 2d0eeb4..4eb8c26 100644
--- a/lib/seeding/fair_ranked_seeding.rb
+++ b/lib/seeding/fair_ranked_seeding.rb
@@ -26,13 +26,7 @@ module Seeding
def better(player1, player2, tournament)
ps1 = previousScore(player1, tournament)
ps2 = previousScore(player2, tournament)
- if ps1 > ps2
- return 1
- elsif ps2 > ps1
- return -1
- else
- return 0
- end
+ ps1 <=> ps2
end
def previousScore(player, tournament)