Refactor rover attributes to add a name

This commit is contained in:
Marc Di Luzio 2020-06-06 16:52:30 +01:00
parent db38ad6091
commit 5e1f9b0d31
10 changed files with 43 additions and 72 deletions

View file

@ -29,8 +29,8 @@ func TestCommand_Move(t *testing.T) {
// Tick the world
world.ExecuteCommandQueues()
newpos, err := world.RoverPosition(a)
newatributes, err := world.RoverAttributes(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
assert.Equal(t, pos, newpos, "Failed to correctly set position for rover")
assert.Equal(t, pos, newatributes.Pos, "Failed to correctly set position for rover")
}