Add "broadcast" command
This will send a readable ascii triplet to all rovers in range
This commit is contained in:
parent
30ca488890
commit
d4d82c38e0
4 changed files with 120 additions and 2 deletions
|
@ -12,6 +12,9 @@ const (
|
|||
|
||||
// CommandRecharge Will use one tick to charge the rover
|
||||
CommandRecharge = "recharge"
|
||||
|
||||
// CommandBroadcast will broadcast a message to nearby rovers within range
|
||||
CommandBroadcast = "broadcast"
|
||||
)
|
||||
|
||||
// Command represends a single command to execute
|
||||
|
@ -20,6 +23,9 @@ type Command struct {
|
|||
|
||||
// Used in the move command
|
||||
Bearing string `json:"bearing,omitempty"`
|
||||
|
||||
// Used in the broadcast command
|
||||
Message []byte `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// CommandStream is a list of commands to execute in order
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue