1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-17 13:24:36 +00:00

Continuing pool bracket movements

This commit is contained in:
2015-10-13 20:57:35 -04:00
parent 906d79c5ac
commit 087c383996
7 changed files with 94 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ class Wrestler < ActiveRecord::Base
@pool = self.weight.returnPoolNumber(self)
end
def boutByRound(round,matches)
def boutByRound(round)
@match = allMatches.select{|m| m.round == round}.first
if @match.blank?
return "BYE"
@@ -36,7 +36,8 @@ class Wrestler < ActiveRecord::Base
end
def poolMatches
allMatches.select{|m| m.bracket_position == "Pool"}
@poolMatches = allMatches.select{|m| m.bracket_position == "Pool"}
@poolMatches.select{|m| m.poolNumber == self.generatePoolNumber}
end
def finishedMatches
@@ -67,4 +68,10 @@ class Wrestler < ActiveRecord::Base
return 0
end
end
def advanceInBracket
@advance = Pooladvance.new
@advance.wrestler = self
@advance.advanceWrestler
end
end