Allow customizing weights

This commit is contained in:
Trevor Slocum 2023-11-30 23:22:12 -08:00
parent 0a1dd87fe7
commit d3f00bbc52
3 changed files with 10 additions and 6 deletions

4
go.mod
View file

@ -3,8 +3,8 @@ module code.rocket9labs.com/tslocum/bgammon-tabula-bot
go 1.21.4
require (
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231130213126-817f86dcf920
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231201021429-50943c96c43d
nhooyr.io/websocket v1.8.10
)
require code.rocket9labs.com/tslocum/tabula v0.0.0-20231130202354-01189fe9433e
require code.rocket9labs.com/tslocum/tabula v0.0.0-20231201072036-2559cbf7f7ea

8
go.sum
View file

@ -1,6 +1,6 @@
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231130213126-817f86dcf920 h1:0WYRdT4yxJgbDPg+LASmNbGUuk9V/k/HfVNukGANFtc=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231130213126-817f86dcf920/go.mod h1:+dgD9v8BlzZjzpIB+/g0lgog90YUoPzEZsp1iAchl30=
code.rocket9labs.com/tslocum/tabula v0.0.0-20231130202354-01189fe9433e h1:+u8tivrgQ8+UhQn/pAW6VHMziwoimD/w0RrEXtThnIQ=
code.rocket9labs.com/tslocum/tabula v0.0.0-20231130202354-01189fe9433e/go.mod h1:DZdQq8KZDVw6rdeo7Zerk74rrX/KQHuKoQgiF+jVmYA=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231201021429-50943c96c43d h1:4FGA2vc8j2gCjioYyzrjbW1hOiNxz06QgqvnjctzKoM=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231201021429-50943c96c43d/go.mod h1:+dgD9v8BlzZjzpIB+/g0lgog90YUoPzEZsp1iAchl30=
code.rocket9labs.com/tslocum/tabula v0.0.0-20231201072036-2559cbf7f7ea h1:cWNtNyZYPCBseJSVvrYcf7Wp0wXMcReqyAuNteBJ/3A=
code.rocket9labs.com/tslocum/tabula v0.0.0-20231201072036-2559cbf7f7ea/go.mod h1:DZdQq8KZDVw6rdeo7Zerk74rrX/KQHuKoQgiF+jVmYA=
nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=

View file

@ -4,6 +4,7 @@ import (
"flag"
"code.rocket9labs.com/tslocum/bgammon-tabula-bot/bot"
"code.rocket9labs.com/tslocum/tabula"
)
func main() {
@ -17,6 +18,9 @@ func main() {
flag.StringVar(&username, "username", "", "Username")
flag.StringVar(&password, "password", "", "Password")
flag.IntVar(&points, "points", 1, "Match points")
flag.Float64Var(&tabula.WeightBlot, "weight-blot", tabula.WeightBlot, "Weight (multiplier) when scoring blots")
flag.Float64Var(&tabula.WeightHit, "weight-hit", tabula.WeightHit, "Weight (multiplier) when scoring hits")
flag.Float64Var(&tabula.WeightOppScore, "weight-score", tabula.WeightOppScore, "Weight (multiplier) when adding opponent score to overall score")
flag.Parse()
c := bot.NewClient(serverAddress, username, password, points)