[golang] implement automation loop and add contract accepting
This commit is contained in:
parent
3dad3f60f2
commit
d97985a694
9 changed files with 223 additions and 64 deletions
15
golang/pkg/agent/error.go
Normal file
15
golang/pkg/agent/error.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package agent
|
||||
|
||||
import "git.adyxax.org/adyxax/spacetraders/golang/pkg/model"
|
||||
|
||||
type shipError struct {
|
||||
err error
|
||||
ship *model.Ship
|
||||
}
|
||||
|
||||
func (a *agent) sendShipError(err error, ship *model.Ship) {
|
||||
a.channel <- shipError{
|
||||
err: err,
|
||||
ship: ship,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue