rove/pkg/game/command.go

24 lines
572 B
Go
Raw Normal View History

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-30 23:59:58 +01:00
// CommandRepair Will attempt to repair the rover with an inventory object
CommandRepair = "repair"
2020-06-06 12:45:45 +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-06 12:45:45 +01:00
// Used in the move command
Bearing string `json:"bearing,omitempty"`
}
// CommandStream is a list of commands to execute in order
type CommandStream []Command