1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Random seeding now works

This commit is contained in:
2015-12-30 16:21:56 +00:00
parent 6ed2bdf547
commit 74577eb9ec
11 changed files with 131 additions and 21 deletions

View File

@@ -11,3 +11,8 @@
name: Mat1
tournament_id: 1
id: 1
two:
name: 1
tournament_id: 2
id: 2

View File

@@ -10,4 +10,8 @@ two:
name: Grove City
tournament_id: 1
three:
id: 3
name: Central Crossing
tournament_id: 2

View File

@@ -9,4 +9,13 @@ one:
tournament_type: Pool to bracket
user_id: 1
two:
id: 2
name: Comet Classic 2
address: Some Place
director: Jacob Cody Wimer
director_email: jacob.wimer@gmail.com
tournament_type: Pool to bracket
user_id: 1

View File

@@ -26,4 +26,7 @@ five:
tournament_id: 1
six:
id: 6
max: 285
tournament_id: 1

View File

@@ -430,4 +430,58 @@ fourtyeight:
original_seed: 16
season_loss: 2
season_win: 50
criteria:
fourtynine:
name: Guy38
school_id: 1
weight_id: 6
original_seed: 1
season_loss: 2
season_win: 50
criteria:
fourtynine:
name: Guy39
school_id: 1
weight_id: 6
original_seed: 2
season_loss: 2
season_win: 50
criteria:
fifty:
name: Guy40
school_id: 1
weight_id: 6
original_seed:
season_loss: 2
season_win: 50
criteria:
fiftyone:
name: Guy41
school_id: 1
weight_id: 6
original_seed:
season_loss: 2
season_win: 50
criteria:
fiftytwo:
name: Guy42
school_id: 1
weight_id: 6
original_seed:
season_loss: 2
season_win: 50
criteria:
fiftythree:
name: Guy43
school_id: 1
weight_id: 6
original_seed:
season_loss: 2
season_win: 50
criteria:

View File

@@ -536,15 +536,12 @@ class PoolAdvancementTest < ActionDispatch::IntegrationTest
assert_equal 12, wrestler.placementPoints
end
test "advancement points fourPoolsToSemi Semis" do
test "advancement points fourPoolsToSemi Semis and Conso Semis" do
sixteenManToSemi
wrestler = Wrestler.where("name = ?", "Guy22").first
assert_equal 9, wrestler.placementPoints
end
test "advancement points fourPoolsToSemi Conso Semis" do
sixteenManToSemi
wrestler = Wrestler.where("name = ?", "Guy29").first
assert_equal 3, wrestler.placementPoints

View File

@@ -256,5 +256,12 @@ class PoolbracketMatchupsTest < ActionDispatch::IntegrationTest
assert_equal lastRound, m.round
end
end
test "Random seeding works" do
weight = Weight.find(6)
wrestlersWithoutSeed = weight.wrestlers.select{|w| w.seed == nil }.size
assert_equal 0, wrestlersWithoutSeed
end
end