2020-06-03 18:12:08 +01:00
|
|
|
package game
|
|
|
|
|
2020-07-10 00:12:54 +01:00
|
|
|
import "github.com/mdiluz/rove/pkg/rove"
|
2020-06-03 18:12:08 +01:00
|
|
|
|
2020-06-06 12:45:45 +01:00
|
|
|
// Command represends a single command to execute
|
|
|
|
type Command struct {
|
2020-07-10 00:12:54 +01:00
|
|
|
Command rove.CommandType `json:"command"`
|
2020-06-03 18:12:08 +01:00
|
|
|
|
2020-06-06 12:45:45 +01:00
|
|
|
// Used in the move command
|
2020-06-26 22:26:27 +01:00
|
|
|
Bearing string `json:"bearing,omitempty"`
|
2020-07-09 22:05:12 +01:00
|
|
|
|
|
|
|
// Used in the broadcast command
|
|
|
|
Message []byte `json:"message,omitempty"`
|
2020-06-03 18:12:08 +01:00
|
|
|
}
|
2020-06-06 14:44:59 +01:00
|
|
|
|
|
|
|
// CommandStream is a list of commands to execute in order
|
|
|
|
type CommandStream []Command
|