mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Update playoff station assignment to match 2018 rules.
This commit is contained in:
@@ -80,8 +80,8 @@ func buildEliminationMatchSet(database *model.Database, round int, group int, nu
|
||||
}
|
||||
|
||||
if len(redAlliance) >= 3 {
|
||||
// Swap the teams around to match the positions dictated by the 2017 rules.
|
||||
redAlliance[0], redAlliance[1], redAlliance[2] = redAlliance[2], redAlliance[0], redAlliance[1]
|
||||
// Swap the teams around to match the positions dictated by the rules.
|
||||
redAlliance[0], redAlliance[1], redAlliance[2] = redAlliance[1], redAlliance[0], redAlliance[2]
|
||||
}
|
||||
}
|
||||
if blueAllianceNumber <= numDirectAlliances {
|
||||
@@ -95,7 +95,7 @@ func buildEliminationMatchSet(database *model.Database, round int, group int, nu
|
||||
}
|
||||
|
||||
if len(blueAlliance) >= 3 {
|
||||
// Swap the teams around to match the positions dictated by the 2017 rules.
|
||||
// Swap the teams around to match the positions dictated by the rules.
|
||||
blueAlliance[0], blueAlliance[1], blueAlliance[2] = blueAlliance[1], blueAlliance[0], blueAlliance[2]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -737,9 +737,9 @@ func TestEliminationScheduleTeamPositions(t *testing.T) {
|
||||
matches, _ := database.GetMatchesByType("elimination")
|
||||
match1 := matches[0]
|
||||
match2 := matches[1]
|
||||
assert.Equal(t, 100, match1.Red1)
|
||||
assert.Equal(t, 10, match1.Red1)
|
||||
assert.Equal(t, 1, match1.Red2)
|
||||
assert.Equal(t, 10, match1.Red3)
|
||||
assert.Equal(t, 100, match1.Red3)
|
||||
assert.Equal(t, 30, match2.Blue1)
|
||||
assert.Equal(t, 3, match2.Blue2)
|
||||
assert.Equal(t, 300, match2.Blue3)
|
||||
|
||||
Reference in New Issue
Block a user