Simplify duplicate command types
This commit is contained in:
parent
97d3583384
commit
e3ce87e964
8 changed files with 28 additions and 56 deletions
|
@ -23,8 +23,8 @@ func TestCommand_Move(t *testing.T) {
|
|||
bearing := North
|
||||
duration := 1
|
||||
// Try the move command
|
||||
moveCommand := world.CommandMove(a, bearing, duration)
|
||||
assert.NoError(t, world.Execute(moveCommand), "Failed to execute move command")
|
||||
moveCommand := Command{Command: CommandMove, Bearing: bearing.String(), Duration: duration}
|
||||
assert.NoError(t, world.Execute(a, moveCommand), "Failed to execute move command")
|
||||
|
||||
newpos, err := world.RoverPosition(a)
|
||||
assert.NoError(t, err, "Failed to set position for rover")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue