Convert bearings to compass points and locations to int coords

This commit is contained in:
Marc Di Luzio 2020-06-05 16:37:52 +01:00
parent ae369715ec
commit be0f4f1aff
10 changed files with 187 additions and 35 deletions

View file

@ -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