21 lines
279 B
Go
21 lines
279 B
Go
package gamemap
|
|
|
|
type mapGen interface {
|
|
generate(l *Level) *Level
|
|
}
|
|
|
|
type defaultGen struct{}
|
|
|
|
func (d defaultGen) generate(l *Level) *Level {
|
|
|
|
l.Tiles, rooms = addRooms(l)
|
|
l.Tiles = connectRooms(rooms)
|
|
l.Objects = populate(rooms)
|
|
|
|
return l
|
|
}
|
|
|
|
func addRooms(l *Level) {
|
|
|
|
}
|