more checking rooms
This commit is contained in:
@ -12,7 +12,7 @@ import (
|
||||
var invalidBlit = errors.New("trying to blit on existing good tile")
|
||||
|
||||
type Room struct {
|
||||
*types.Rect
|
||||
types.Rect
|
||||
Center types.Coords
|
||||
Geometry []func() *Tile
|
||||
Mobs []mob.Mob
|
||||
@ -73,8 +73,8 @@ func (room *Room) MoveToCoords(where types.Coords) *Room {
|
||||
return room
|
||||
}
|
||||
|
||||
func NewRandomRectRoom(rng *util.RNG, w, h int, fillage types.RectFill) *Room {
|
||||
newRoom := &Room{
|
||||
func NewRandomRectRoom(rng *util.RNG, w, h int, fillage types.RectFill) Room {
|
||||
newRoom := Room{
|
||||
Rect: types.NewRect(
|
||||
0,
|
||||
0,
|
||||
@ -84,7 +84,7 @@ func NewRandomRectRoom(rng *util.RNG, w, h int, fillage types.RectFill) *Room {
|
||||
Center: types.Coords{w / 2, h /2 },
|
||||
Geometry: make([]func()*Tile, w*h),
|
||||
}
|
||||
newRoom.Blit(fillage, newRoom)
|
||||
newRoom.Blit(fillage, &newRoom)
|
||||
//add connectors
|
||||
newRoom.Connectors = append(
|
||||
newRoom.Connectors,
|
||||
|
Reference in New Issue
Block a user