ui starting, menu screen, ingame help
This commit is contained in:
@ -24,6 +24,9 @@ func DefaultGen(l *gamemap.Level) (*gamemap.Level, []*gamemap.Room) {
|
||||
|
||||
rooms := make([]*gamemap.Room, 0)
|
||||
|
||||
//one wall around whole level guaranteed
|
||||
levelBoundary := types.NewRect(l.X + 1, l.Y + 1, l.W - 2, l.H - 2)
|
||||
|
||||
for i := 0; i < maxrooms; i++ {
|
||||
newRoom := &gamemap.Room{
|
||||
Rect: types.NewRect(
|
||||
@ -36,7 +39,7 @@ func DefaultGen(l *gamemap.Level) (*gamemap.Level, []*gamemap.Room) {
|
||||
|
||||
failed := false
|
||||
|
||||
if !l.InBounds(types.Coords{newRoom.X, newRoom.Y}) {
|
||||
if !levelBoundary.InBounds(types.Coords{newRoom.X, newRoom.Y}) {
|
||||
failed = true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user