Fix lint errors
This commit is contained in:
parent
1e18610c5c
commit
6adc652cea
2 changed files with 9 additions and 6 deletions
|
@ -16,7 +16,8 @@ func TestCommand_Toggle(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, roveapi.SailPosition_SolarCharging, r.SailPosition)
|
assert.Equal(t, roveapi.SailPosition_SolarCharging, r.SailPosition)
|
||||||
|
|
||||||
w.Enqueue(a, &roveapi.Command{Command: roveapi.CommandType_toggle})
|
err = w.Enqueue(a, &roveapi.Command{Command: roveapi.CommandType_toggle})
|
||||||
|
assert.NoError(t, err)
|
||||||
w.EnqueueAllIncoming()
|
w.EnqueueAllIncoming()
|
||||||
w.Tick()
|
w.Tick()
|
||||||
|
|
||||||
|
@ -24,7 +25,8 @@ func TestCommand_Toggle(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, roveapi.SailPosition_CatchingWind, r.SailPosition)
|
assert.Equal(t, roveapi.SailPosition_CatchingWind, r.SailPosition)
|
||||||
|
|
||||||
w.Enqueue(a, &roveapi.Command{Command: roveapi.CommandType_toggle})
|
err = w.Enqueue(a, &roveapi.Command{Command: roveapi.CommandType_toggle})
|
||||||
|
assert.NoError(t, err)
|
||||||
w.EnqueueAllIncoming()
|
w.EnqueueAllIncoming()
|
||||||
w.Tick()
|
w.Tick()
|
||||||
|
|
||||||
|
@ -38,7 +40,8 @@ func TestCommand_Turn(t *testing.T) {
|
||||||
a, err := w.SpawnRover()
|
a, err := w.SpawnRover()
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
w.Enqueue(a, &roveapi.Command{Command: roveapi.CommandType_turn, Turn: roveapi.Bearing_NorthWest})
|
err = w.Enqueue(a, &roveapi.Command{Command: roveapi.CommandType_turn, Turn: roveapi.Bearing_NorthWest})
|
||||||
|
assert.NoError(t, err)
|
||||||
w.EnqueueAllIncoming()
|
w.EnqueueAllIncoming()
|
||||||
w.Tick()
|
w.Tick()
|
||||||
|
|
||||||
|
|
|
@ -262,9 +262,9 @@ func (w *World) TryMoveRover(rover string, b roveapi.Bearing) (maths.Vector, err
|
||||||
i.AddLogEntryf("tried to move %s to %+v", b.String(), newPos)
|
i.AddLogEntryf("tried to move %s to %+v", b.String(), newPos)
|
||||||
i.Integrity = i.Integrity - 1
|
i.Integrity = i.Integrity - 1
|
||||||
i.AddLogEntryf("had a collision, new integrity %d", i.Integrity)
|
i.AddLogEntryf("had a collision, new integrity %d", i.Integrity)
|
||||||
if i.Integrity == 0 {
|
// TODO: The rover needs to be left dormant with the player
|
||||||
// TODO: The rover needs to be left dormant with the player
|
//if i.Integrity == 0 {
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
return i.Pos, nil
|
return i.Pos, nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue