diff --git a/pkg/game/world.go b/pkg/game/world.go index 7a6a7f2..a88282c 100644 --- a/pkg/game/world.go +++ b/pkg/game/world.go @@ -44,13 +44,20 @@ func (w *World) SpawnRover() uuid.UUID { Speed: 1.0, Range: 20.0, - Pos: Vector{}, // Set the name randomly Name: babble.NewBabbler().Babble(), }, } + // Spawn in a random place near the origin + rover.Attributes.Pos = Vector{ + 10 - (rand.Int() % 20), + 10 - (rand.Int() % 20), + } + + // TODO: Verify no blockages in this area + // Append the rover to the list w.Rovers[rover.Id] = rover