context is great again, fixes to connectors

This commit is contained in:
2019-11-14 22:42:03 +03:00
parent 6a37870bd2
commit 98aa197578
5 changed files with 33 additions and 17 deletions

View File

@ -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
}