20 lines
280 B
Go
20 lines
280 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) {
|
|
|
|
} |