upd methods

This commit is contained in:
2019-10-27 01:30:57 +03:00
parent b8c8a65fa7
commit 0da505b01b
3 changed files with 27 additions and 7 deletions

View File

@ -6,9 +6,9 @@ import (
"lab.zaar.be/thefish/alchemyst-go/util"
)
//fixme move to config
var maxrooms = 100
var minRoomSize = 3
var maxRoomSize = 11
var maxrooms = 100
func DefaultGen(l *gamemap.Level) *gamemap.Level {
@ -23,7 +23,7 @@ func DefaultGen(l *gamemap.Level) *gamemap.Level {
rooms := make([]*gamemap.Room, maxrooms)
for i := 0; i < l.MaxRooms; i++ {
for i := 0; i < maxrooms; i++ {
newRoom := &gamemap.Room{
Rect: types.NewRect(
rng.Range(l.X, l.W),
@ -92,7 +92,6 @@ func digHTunnel(l *gamemap.Level, x1,x2,y int, fillage types.RectFill) {
}
}
func digVTunnel(l *gamemap.Level, y1,y2,x int, fillage types.RectFill) {
var start, finish int
if y1 > y2 {