summaryrefslogtreecommitdiff
path: root/lib/scheduling/roundrobin.rb
diff options
context:
space:
mode:
authornfoy <nfoy@purdue.edu>2014-04-26 23:45:25 -0400
committernfoy <nfoy@purdue.edu>2014-04-26 23:45:25 -0400
commit6f19b51f0adf95b1d9bd8317388ecdbcb3756be7 (patch)
treec4be583ba9db126ef58db7a1900468ec0929df25 /lib/scheduling/roundrobin.rb
parent9d8d6b023ce3390f3ccf9808e630505a15ebebe6 (diff)
parent9dd899559e4533c61089c3f9429574d2de20925e (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'lib/scheduling/roundrobin.rb')
-rw-r--r--lib/scheduling/roundrobin.rb31
1 files changed, 21 insertions, 10 deletions
diff --git a/lib/scheduling/roundrobin.rb b/lib/scheduling/roundrobin.rb
index e149860..7a9e257 100644
--- a/lib/scheduling/roundrobin.rb
+++ b/lib/scheduling/roundrobin.rb
@@ -14,6 +14,17 @@ module Scheduling
end
end
+ def finish_match(match)
+ #declare winner of match, and store that somehow
+ rotate
+ return "totes worked\n"
+ end
+
+ def graph(current_user)
+ end
+
+ private
+
def create_round_array
#round robin should look like this.
#NOTE: I DO NOT KNOW IF THIS IS HOW TO PROPERLY POPULATE THE ROUND ROBIN ARRAY WITH TEAMS
@@ -28,15 +39,23 @@ module Scheduling
end
end
- #this is called when a round has completed
+ def tournament_stage
+ @tournament_stage
+ end
+
+ def tournament
+ tournament_stage.tournament
+ end
+
def rotate
+ #this is called when a round has completed
+
#remove first team
hold = @team_pairs.shift
#rotate by 1 element
@team_pairs.rotate!
#place first team the front of the array
@team_pairs.unshift(hold)
-
end
def mother_fuckin_winner
@@ -50,14 +69,6 @@ module Scheduling
scores[weiner]
end
- def match_finished(match)
- #declare winner of match, and store that somehow
- rotate
- return "totes worked\n"
- end
- def graph(current_user)
-
- end
end
end