Prepare to refactor movement to be based on attributes
This commit is contained in:
parent
d0a5b91de7
commit
33f25a7414
8 changed files with 45 additions and 47 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue