Fix the random rock spawns
This commit is contained in:
parent
4d00af248f
commit
de0ccbaa6e
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ func (a *Atlas) SpawnWorld() error {
|
||||||
// Pepper the current world with rocks
|
// Pepper the current world with rocks
|
||||||
for i := -extent; i < extent; i++ {
|
for i := -extent; i < extent; i++ {
|
||||||
for j := -extent; j < extent; j++ {
|
for j := -extent; j < extent; j++ {
|
||||||
if rand.Int()%16 == 0 {
|
if rand.Intn(16) == 0 {
|
||||||
if err := a.SetTile(Vector{i, j}, TileRock); err != nil {
|
if err := a.SetTile(Vector{i, j}, TileRock); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue