Skip to content

Commit

Permalink
Slight eval changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexclewontin committed Jul 30, 2020
1 parent 5e173c2 commit c3530fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ benchmark_results.txt
.vscode/
*.rej
profile.out
*.test
*.test
eval/optimization_test.go
4 changes: 2 additions & 2 deletions eval/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func HandValue(c0, c1, c2, c3, c4 Card) int {
//
// WARNING: See the warning associated with HandValue.
func BestFiveOfSeven(c0, c1, c2, c3, c4, c5, c6 Card) ([]Card, int) {
base := []Card{c0, c1, c2, c3, c4, c5, c6}
base := [7]Card{c0, c1, c2, c3, c4, c5, c6}
var bestHand []Card
bestScore := 8000 // larger value than the worst hand, so the first real hand will always be better
for ndx := range base {
Expand All @@ -100,7 +100,7 @@ func BestFiveOfSeven(c0, c1, c2, c3, c4, c5, c6 Card) ([]Card, int) {
//
// WARNING: See the warning associated with HandValue.
func BestFiveOfSix(c0, c1, c2, c3, c4, c5 Card) ([]Card, int) {
base := []Card{c0, c1, c2, c3, c4, c5}
base := [6]Card{c0, c1, c2, c3, c4, c5}
bestNdx := 0
bestScore := 8000 // larger value than the worst hand, so the first real hand will always be better
for ndx := range base {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.13
replace github.com/alexclewontin/riverboat/eval => ./eval

require (
github.com/alexclewontin/riverboat/eval v0.2.1-00010101000000-000000000000
github.com/alexclewontin/riverboat/eval v0.2.1
github.com/stretchr/testify v1.6.1 // indirect
)

0 comments on commit c3530fe

Please sign in to comment.