summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pairing/PairingAlgorithm.rb2
-rw-r--r--lib/scheduling/elimination.rb5
-rw-r--r--lib/scoring/scoring_algorithm.rb10
3 files changed, 10 insertions, 7 deletions
diff --git a/lib/pairing/PairingAlgorithm.rb b/lib/pairing/PairingAlgorithm.rb
index c3d7f7b..81e4df6 100644
--- a/lib/pairing/PairingAlgorithm.rb
+++ b/lib/pairing/PairingAlgorithm.rb
@@ -1,4 +1,4 @@
-module Leaguer
+module Pairing
class PairingAlgorithm
def self.pair(matches, players)
end
diff --git a/lib/scheduling/elimination.rb b/lib/scheduling/elimination.rb
index 055fdbd..1ac696d 100644
--- a/lib/scheduling/elimination.rb
+++ b/lib/scheduling/elimination.rb
@@ -10,6 +10,7 @@ module Scheduling
def tournament_stage
@tournament_stage
end
+
def tournament
self.tournament_stage.tournament
end
@@ -20,8 +21,12 @@ module Scheduling
for i in 1..num_matches
self.tournament_stage.matches.create(status: 0, submitted_peer_evaluations: 0)
end
+
match_num = num_matches-1
team_num = 0
+
+ self.tournament.players.shuffle
+
# for each grouping of min_players_per_team
self.tournament.players.each_slice(self.tournament.min_players_per_team) do |team_members|
# if the match is full, move to the next match, otherwise move to the next team
diff --git a/lib/scoring/scoring_algorithm.rb b/lib/scoring/scoring_algorithm.rb
index 6277da8..f2afa6f 100644
--- a/lib/scoring/scoring_algorithm.rb
+++ b/lib/scoring/scoring_algorithm.rb
@@ -1,8 +1,6 @@
-module Leaguer
- module Scoring
- class ScoringAlgorithm
- def self.score(match, interface)
- end
+module Scoring
+ class ScoringAlgorithm
+ def self.score(match, interface)
end
end
-end \ No newline at end of file
+end