Add cron tick of command queue

This commit is contained in:
Marc Di Luzio 2020-06-06 15:52:03 +01:00
parent 0a0a32cf58
commit 573bfbf9c7
7 changed files with 113 additions and 13 deletions

View file

@ -124,6 +124,9 @@ func TestHandleCommand(t *testing.T) {
attrib, err := s.world.RoverAttributes(inst)
assert.NoError(t, err, "Couldn't get rover attribs")
// Tick the command queues to progress the move command
s.world.ExecuteCommandQueues()
pos2, err := s.world.RoverPosition(inst)
assert.NoError(t, err, "Couldn't get rover position")
pos.Add(game.Vector{X: 0.0, Y: attrib.Speed * 1}) // Should have moved north by the speed and duration