[golang] finished implementing procument contracts
This commit is contained in:
parent
40c4a8df15
commit
e887213aff
15 changed files with 252 additions and 56 deletions
|
@ -30,6 +30,9 @@ func (c *Client) Accept(contract *model.Contract) error {
|
|||
}
|
||||
|
||||
func (c *Client) Deliver(contract *model.Contract, ship *model.Ship) error {
|
||||
if err := c.Dock(ship); err != nil {
|
||||
return fmt.Errorf("failed to dock: %w", err)
|
||||
}
|
||||
deliver := contract.Terms.Deliver[0]
|
||||
var units int
|
||||
for _, cargoItem := range ship.Cargo.Inventory {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue