Prepare to refactor movement to be based on attributes

This commit is contained in:
Marc Di Luzio 2020-06-04 18:54:33 +01:00
parent d0a5b91de7
commit 33f25a7414
8 changed files with 45 additions and 47 deletions

View file

@ -6,11 +6,12 @@ import "github.com/google/uuid"
type Command func() error
// CommandMove will move the instance in question
func (w *World) CommandMove(id uuid.UUID, vec Vector) Command {
func (w *World) CommandMove(id uuid.UUID, bearing float64, duration int64) Command {
return func() error {
// Move the instance
_, err := w.MovePosition(id, vec)
return err
// TODO: Calculate the move itself
//_, err := w.MovePosition(id, vec)
return nil
}
}