Add cron tick of command queue
This commit is contained in:
parent
0a0a32cf58
commit
573bfbf9c7
7 changed files with 113 additions and 13 deletions
|
@ -26,6 +26,9 @@ func TestCommand_Move(t *testing.T) {
|
|||
moveCommand := Command{Command: CommandMove, Bearing: bearing.String(), Duration: duration}
|
||||
assert.NoError(t, world.Enqueue(a, moveCommand), "Failed to execute move command")
|
||||
|
||||
// Tick the world
|
||||
world.ExecuteCommandQueues()
|
||||
|
||||
newpos, err := world.RoverPosition(a)
|
||||
assert.NoError(t, err, "Failed to set position for rover")
|
||||
pos.Add(Vector{0.0, duration * attribs.Speed}) // We should have moved duration*speed north
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue