summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-04-26 18:26:43 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-04-26 18:26:43 -0400
commit78df502c74525cee987e551fc82e91595e63ed01 (patch)
treef39aebb2548486d6cdb3a37ae871a16d63655239 /lib
parent4035c852212671627a000cda7c1f8439b47a70d5 (diff)
Added match creation to roundrobin.rb. Also Luke did not give us broken ass code, sorry for the last message Luke.
Diffstat (limited to 'lib')
-rw-r--r--lib/scheduling/roundrobin.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/scheduling/roundrobin.rb b/lib/scheduling/roundrobin.rb
index fbb291e..e149860 100644
--- a/lib/scheduling/roundrobin.rb
+++ b/lib/scheduling/roundrobin.rb
@@ -9,6 +9,9 @@ module Scheduling
def create_matches
num_teams = (tournament.players.count/tournament.min_players_per_team).floor
num_matches = Float(num_teams/2)*(num_teams-1)
+ for i in 1..num_matches
+ tournament_stage.matches.create(status: 0, submitted_peer_evaluations: 0)
+ end
end
def create_round_array