mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed model names
This commit is contained in:
@@ -16,7 +16,7 @@ module GeneratesTournamentMatches
|
||||
Pool.new(weight).generatePools()
|
||||
last_match = matches.where(weight: weight).order(round: :desc).limit(1).first
|
||||
highest_round = last_match.round
|
||||
Poolbracket.new(weight, highest_round).generateBracketMatches()
|
||||
PoolBracket.new(weight, highest_round).generateBracketMatches()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Pooladvance
|
||||
class PoolAdvance
|
||||
|
||||
def initialize(wrestler)
|
||||
@wrestler = wrestler
|
||||
@@ -1,4 +1,4 @@
|
||||
class Poolbracket
|
||||
class PoolBracket
|
||||
|
||||
def initialize(weight, highest_round)
|
||||
@weight = weight
|
||||
@@ -1,4 +1,4 @@
|
||||
class Poolbracketplacementpoints
|
||||
class PoolBracketPlacementPoints
|
||||
def initialize(wrestler)
|
||||
@wrestler = wrestler
|
||||
@bracket = wrestler.weight.pool_bracket_type
|
||||
@@ -122,4 +122,4 @@ class Poolbracketplacementpoints
|
||||
def eighthPlace
|
||||
3
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
class Poolorder
|
||||
class PoolOrder
|
||||
def initialize(wrestlers)
|
||||
@wrestlers = wrestlers
|
||||
end
|
||||
@@ -144,4 +144,4 @@ class Poolorder
|
||||
addPointsToWrestlersAhead(wrestler)
|
||||
addPoints(wrestler)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -139,6 +139,6 @@ class Weight < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def poolOrder(pool)
|
||||
Poolorder.new(wrestlersForPool(pool)).getPoolOrder
|
||||
PoolOrder.new(wrestlersForPool(pool)).getPoolOrder
|
||||
end
|
||||
end
|
||||
|
||||
@@ -24,7 +24,7 @@ class Wrestler < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def placementPoints
|
||||
Poolbracketplacementpoints.new(self).calcPoints
|
||||
PoolBracketPlacementPoints.new(self).calcPoints
|
||||
end
|
||||
|
||||
def totalDeductedPoints
|
||||
@@ -172,6 +172,6 @@ class Wrestler < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def advanceInBracket
|
||||
Pooladvance.new(self).advanceWrestler
|
||||
PoolAdvance.new(self).advanceWrestler
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user