1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-04 13:43:48 +00:00

First shot at setting placement points for a single pool

This commit is contained in:
2016-01-28 16:36:13 +00:00
parent a8b96c96e8
commit 1b9151a888
3 changed files with 28 additions and 0 deletions

View File

@@ -16,6 +16,9 @@ class PoolBracketPlacementPoints
if @bracket == "fourPoolsToSemi"
whilePointsAreZero { @points = fourPoolsToSemi }
end
if wrestler.weight.size <= 6 && wrestler.weight.allPoolMatchesFinished(1)
whilePointsAreZero { @points = onePool }
end
return @points
end
@@ -63,6 +66,19 @@ class PoolBracketPlacementPoints
return 0
end
def onePool
poolOrder = wrestler.weight.poolOrder(1)
if wrestler == poolOrder.first
firstPlace
elsif wrestler == poolOrder.second
secondPlace
elsif wrestler == poolOrder.third
thirdPlace
elsif wrestler == poolOrder.fourth
fourthPlace
end
end
def finalMatchPoints
if won_bracket_position_size("1/2") > 0
return firstPlace