Skip to content

Commit

Permalink
Swap red/blue in double-elimination Match 11 to match FIRST rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
patfair committed Sep 8, 2022
1 parent 2dac0ff commit 5a4cc0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bracket/double_elimination.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ var doubleEliminationBracketMatchupTemplates = []matchupTemplate{
matchupKey: newMatchupKey(4, 1),
displayName: "11",
NumWinsToAdvance: 1,
redAllianceSource: newWinnerAllianceSource(3, 1),
blueAllianceSource: newWinnerAllianceSource(3, 2),
redAllianceSource: newWinnerAllianceSource(3, 2),
blueAllianceSource: newWinnerAllianceSource(3, 1),
},
{
matchupKey: newMatchupKey(4, 2),
Expand Down
4 changes: 2 additions & 2 deletions bracket/double_elimination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ func TestDoubleEliminationProgression(t *testing.T) {
matches, err = database.GetMatchesByType("elimination")
assert.Nil(t, err)
if assert.Equal(t, 12, len(matches)) {
assertMatch(t, matches[10], "11", 8, 7)
assertMatch(t, matches[10], "11", 7, 8)
assertMatch(t, matches[11], "12", 4, 3)
}

scoreMatch(database, "11", game.BlueWonMatch)
scoreMatch(database, "11", game.RedWonMatch)
assert.Nil(t, bracket.Update(database, &dummyStartTime))
matches, err = database.GetMatchesByType("elimination")
assert.Nil(t, err)
Expand Down

0 comments on commit 5a4cc0e

Please sign in to comment.