Update dependencies

This commit is contained in:
Trevor Slocum 2024-01-05 19:13:21 -08:00
parent ccf9dd359e
commit a73bb828ec
3 changed files with 12 additions and 13 deletions

View file

@ -499,7 +499,7 @@ func (c *Client) HandleEvents() {
if move[0] == 0 && move[1] == 0 {
break
}
newGame.AddLocalMove([]int{int(move[0]), int(move[1])})
newGame.AddLocalMove([]int8{move[0], move[1]})
}
newBoardState := TabulaBoard(newGame.Board)
doubles := newBoardState.ChooseDoubles(&c.analysis)
@ -562,7 +562,7 @@ func (c *Client) HandleEvents() {
}
}
func TabulaBoard(b []int) tabula.Board {
func TabulaBoard(b []int8) tabula.Board {
var roll1, roll2, roll3, roll4 int8
roll1, roll2 = int8(Game.Roll1), int8(Game.Roll2)
if roll1 == roll2 {
@ -579,7 +579,7 @@ func TabulaBoard(b []int) tabula.Board {
}
acey = 1
}
return tabula.Board{int8(b[0]), int8(b[1]), int8(b[2]), int8(b[3]), int8(b[4]), int8(b[5]), int8(b[6]), int8(b[7]), int8(b[8]), int8(b[9]), int8(b[10]), int8(b[11]), int8(b[12]), int8(b[13]), int8(b[14]), int8(b[15]), int8(b[16]), int8(b[17]), int8(b[18]), int8(b[19]), int8(b[20]), int8(b[21]), int8(b[22]), int8(b[23]), int8(b[24]), int8(b[25]), int8(b[26]), int8(b[27]), roll1, roll2, roll3, roll4, entered1, entered2, acey}
return tabula.Board{b[0], b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15], b[16], b[17], b[18], b[19], b[20], b[21], b[22], b[23], b[24], b[25], b[26], b[27], roll1, roll2, roll3, roll4, entered1, entered2, acey}
}
func randInt(max int) int {
@ -607,5 +607,4 @@ var phrases = [][]byte{
[]byte("My checkers all had different rotations!"),
[]byte("My checkers foolishly walk on single rolls instead of astride doubles."),
[]byte("Alas, I could find naught but tiny rolls."),
[]byte("No wonder thou wert victorious! I shalt abdicate."),
}

6
go.mod
View file

@ -3,9 +3,9 @@ module code.rocket9labs.com/tslocum/bgammon-tabula-bot
go 1.17
require (
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231225075851-a2fb60cf355b
code.rocket9labs.com/tslocum/tabula v0.0.0-20231223213411-12f4416eafe1
code.rocket9labs.com/tslocum/bgammon v0.0.0-20240106024113-469865395f77
code.rocket9labs.com/tslocum/tabula v0.0.0-20240102002109-32165ed8d7ec
nhooyr.io/websocket v1.8.10
)
require code.rocket9labs.com/tslocum/bei v0.0.0-20231223213316-ef6cb993c773 // indirect
require code.rocket9labs.com/tslocum/bei v0.0.0-20240104011455-722dd38546ef // indirect

12
go.sum
View file

@ -1,8 +1,8 @@
code.rocket9labs.com/tslocum/bei v0.0.0-20231223213316-ef6cb993c773 h1:cu3FKYfk5WQcuxMXrqghHAmriyFiRCZ/8aUqIKI9yLU=
code.rocket9labs.com/tslocum/bei v0.0.0-20231223213316-ef6cb993c773/go.mod h1:tS60/VNAJphKvDBkSLQhKALa15msIAuWWfEKNc4oFZc=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231225075851-a2fb60cf355b h1:Wlzs+62I+INQf+iAks2KduLKSP0v3yi4mJdSNxLfu3w=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20231225075851-a2fb60cf355b/go.mod h1:pM1hNhG/vKgk4Ktpszv5duQ3gJMrawO6gwotpJjHxyE=
code.rocket9labs.com/tslocum/tabula v0.0.0-20231223213411-12f4416eafe1 h1:mG11OT0JA5/zwN/rB02NnSIdgXZ3NEtZrPhOOrbsg+A=
code.rocket9labs.com/tslocum/tabula v0.0.0-20231223213411-12f4416eafe1/go.mod h1:ZvMo2xto5GUODvzLiTNEg5DjHoKULK+HGt8wfYHHq78=
code.rocket9labs.com/tslocum/bei v0.0.0-20240104011455-722dd38546ef h1:pE3r8hvM5fWnbtHoaY6TL/mlixMATbMo9y16u2F0cXU=
code.rocket9labs.com/tslocum/bei v0.0.0-20240104011455-722dd38546ef/go.mod h1:tS60/VNAJphKvDBkSLQhKALa15msIAuWWfEKNc4oFZc=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20240106024113-469865395f77 h1:vxsZZONI5d+6bDKhNhvu05E4VTTl8d4GMJvR8nXSv9U=
code.rocket9labs.com/tslocum/bgammon v0.0.0-20240106024113-469865395f77/go.mod h1:qoXFACgj2k4y5996rU5+GxZ2x9De1ZyA3+GraUJpFj8=
code.rocket9labs.com/tslocum/tabula v0.0.0-20240102002109-32165ed8d7ec h1:Ugo9B7zT91kjyVUZ09J9pitbYMUVofaI36Gmajpi9kc=
code.rocket9labs.com/tslocum/tabula v0.0.0-20240102002109-32165ed8d7ec/go.mod h1:ZvMo2xto5GUODvzLiTNEg5DjHoKULK+HGt8wfYHHq78=
nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=