context is great again, fixes to connectors
This commit is contained in:
@ -5,13 +5,12 @@ import (
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap"
|
||||
"lab.zaar.be/thefish/alchemyst-go/engine/types"
|
||||
"lab.zaar.be/thefish/alchemyst-go/util"
|
||||
"lab.zaar.be/thefish/alchemyst-go/util/appctx"
|
||||
)
|
||||
|
||||
//fixme move to config
|
||||
var minRoomSize = 5
|
||||
var maxRoomSize = 15
|
||||
var maxrooms = 200
|
||||
var minRoomSize = 8
|
||||
var maxRoomSize = 22
|
||||
var maxrooms = 100
|
||||
|
||||
var fges = map[int]types.RectFill{
|
||||
1: types.RectFill{
|
||||
|
@ -91,10 +91,10 @@ func NewRandomRectRoom(rng *util.RNG, w, h int, fillage types.RectFill) Room {
|
||||
//add connectors
|
||||
newRoom.Connectors = append(
|
||||
newRoom.Connectors,
|
||||
types.Coords{rng.Range(1, w - 2), 0},
|
||||
types.Coords{rng.Range(1, w - 2), h -1},
|
||||
types.Coords{0, rng.Range(1, h - 1)},
|
||||
types.Coords{w - 1, rng.Range(1, h - 1)},
|
||||
types.Coords{rng.Range(1, w - 2), 1},
|
||||
types.Coords{rng.Range(1, w - 2), h -2},
|
||||
types.Coords{1, rng.Range(1, h - 2)},
|
||||
types.Coords{w - 2, rng.Range(1, h - 2)},
|
||||
)
|
||||
return newRoom
|
||||
}
|
||||
|
Reference in New Issue
Block a user