Skip to content

Commit

Permalink
Add multiplier for repeated bye penalty
Browse files Browse the repository at this point in the history
  • Loading branch information
jvc56 committed Jan 16, 2025
1 parent c93065e commit 28451a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/pair/cop/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func TestCompare(t *testing.T) {
is := is.New(t)
ctx := context.Background()

tourneyName := "2024-12-29-Albany-NWL-ME"
tourneyName := "2024-12-29-Albany-CSW-ME"

// URLs and filepaths
tfileURL := fmt.Sprintf("https://scrabbleplayers.org/directors/AA003954/%s/a.t", tourneyName)
Expand Down
5 changes: 3 additions & 2 deletions pkg/pair/cop/cop.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,11 @@ var weightPolicies = []weightPolicy{
return 0
}
pi := pargs.playerNodes[ri]
if pargs.copdata.PairingCounts[copdatapkg.GetPairingKey(pi, pj)] == 0 {
numTimesWithBye := pargs.copdata.PairingCounts[copdatapkg.GetPairingKey(pi, pj)]
if numTimesWithBye == 0 {
return 0
}
return majorPenalty
return majorPenalty * int64(numTimesWithBye)
},
},
}
Expand Down

0 comments on commit 28451a8

Please sign in to comment.