Fix small and large rock spawning

This commit is contained in:
Marc Di Luzio 2020-07-03 17:13:52 +01:00
parent 1a1ef9a376
commit 9cd5324465
2 changed files with 3 additions and 1 deletions

View file

@ -111,6 +111,8 @@ func (c *Chunk) populate(size int) {
for i := 0; i < len(c.Tiles); i++ {
if rand.Intn(16) == 0 {
c.Objects[i] = objects.Object{Type: objects.LargeRock}
} else if rand.Intn(32) == 0 {
c.Objects[i] = objects.Object{Type: objects.SmallRock}
}
}
}

View file

@ -15,7 +15,7 @@ const (
SmallRock = Type('o')
// LargeRock is a large blocking rock
LargeRock = Type('o')
LargeRock = Type('O')
)
// Object represents an object in the world