Skip to content

Commit

Permalink
fix(api): double dip plays as b side
Browse files Browse the repository at this point in the history
  • Loading branch information
codephobia committed Apr 12, 2024
1 parent 25da849 commit e8680f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/go/challonge/challonge.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ func (c *Challonge) getNextMatchForTable(table int) (*Match, error) {
}

// set race for a/b side
if c.Tournament.matchIsDoubleDip(match) || (!c.Tournament.matchIsDoubleDip(match) && match.IsOnASide()) {
if err := c.tables[table].Game.SetRaceTo(c.Settings.ASideRaceTo); err != nil {
if c.Tournament.matchIsDoubleDip(match) || !match.IsOnASide() {
if err := c.tables[table].Game.SetRaceTo(c.Settings.BSideRaceTo); err != nil {
return nil, err
}
} else {
if err := c.tables[table].Game.SetRaceTo(c.Settings.BSideRaceTo); err != nil {
if err := c.tables[table].Game.SetRaceTo(c.Settings.ASideRaceTo); err != nil {
return nil, err
}
}
Expand Down

0 comments on commit e8680f9

Please sign in to comment.