2020-06-03 18:12:08 +01:00
|
|
|
package game
|
|
|
|
|
2020-06-06 12:45:45 +01:00
|
|
|
const (
|
2020-06-30 23:59:58 +01:00
|
|
|
// CommandMove Moves the rover in the chosen bearing
|
2020-06-06 12:45:45 +01:00
|
|
|
CommandMove = "move"
|
2020-06-26 18:59:12 +01:00
|
|
|
|
2020-06-30 23:59:58 +01:00
|
|
|
// CommandStash Will attempt to stash the object at the current location
|
2020-06-26 18:59:12 +01:00
|
|
|
CommandStash = "stash"
|
2020-06-27 01:35:09 +01:00
|
|
|
|
2020-06-30 23:59:58 +01:00
|
|
|
// CommandRepair Will attempt to repair the rover with an inventory object
|
2020-06-27 01:35:09 +01:00
|
|
|
CommandRepair = "repair"
|
2020-06-06 12:45:45 +01:00
|
|
|
)
|
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 {
|
|
|
|
Command string `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-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
|