Convert bearings to compass points and locations to int coords
This commit is contained in:
parent
ae369715ec
commit
be0f4f1aff
10 changed files with 187 additions and 35 deletions
|
@ -6,7 +6,7 @@ import "github.com/google/uuid"
|
|||
type Command func() error
|
||||
|
||||
// CommandMove will move the rover in question
|
||||
func (w *World) CommandMove(id uuid.UUID, bearing float64, duration float64) Command {
|
||||
func (w *World) CommandMove(id uuid.UUID, bearing Direction, duration int) Command {
|
||||
return func() error {
|
||||
_, err := w.MoveRover(id, bearing, duration)
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue