mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-16 13:03:37 +00:00
Finished pool advance logic still need tests
This commit is contained in:
@@ -8,6 +8,19 @@ class Wrestler < ActiveRecord::Base
|
||||
self.tournament.destroyAllMatches
|
||||
end
|
||||
|
||||
def resultByBout(bout)
|
||||
@match = Match.where("bout_number = ? AND finished = ?",bout,1)
|
||||
if @match.size == 0
|
||||
return ""
|
||||
end
|
||||
if @match.first.winner_id == self.id
|
||||
return "W #{@match.first.score}"
|
||||
end
|
||||
if @match.first.winner_id != self.id
|
||||
return "L #{@match.first.score}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def isWrestlingThisRound(matchRound)
|
||||
if allMatches.blank?
|
||||
|
||||
Reference in New Issue
Block a user