room

package
v0.0.0-...-e449b39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RoomIDMaker = idu64str.New("RoomID")

Functions

This section is empty.

Types

type Room

type Room struct {
	UUID       string
	BgTile     tile_flag.TileFlag
	Area       rect.Rect
	Tiles      [][]tile_flag.TileFlag
	ConnectPos [][2]int // door outer pos , out of room area
	// for sort
	RecyclerCount         int
	PortalCount           int
	TrapCount             int
	RotateLineAttackCount int
	MineCount             int
}

func New

func New(rt rect.Rect, bgTile tile_flag.TileFlag) *Room

func (*Room) AddDoorRand_E

func (r *Room) AddDoorRand_E(rnd *g2rand.G2Rand, wallrect rect.Rect, doortile tile_flag.TileFlag, shiftConnectPos int)

func (*Room) AddDoorRand_N

func (r *Room) AddDoorRand_N(rnd *g2rand.G2Rand, wallrect rect.Rect, doortile tile_flag.TileFlag, shiftConnectPos int)

func (*Room) AddDoorRand_S

func (r *Room) AddDoorRand_S(rnd *g2rand.G2Rand, wallrect rect.Rect, doortile tile_flag.TileFlag, shiftConnectPos int)

func (*Room) AddDoorRand_W

func (r *Room) AddDoorRand_W(rnd *g2rand.G2Rand, wallrect rect.Rect, doortile tile_flag.TileFlag, shiftConnectPos int)

func (*Room) AddWindowRand_E

func (r *Room) AddWindowRand_E(rnd *g2rand.G2Rand, wallrect rect.Rect, wintile tile_flag.TileFlag)

func (*Room) AddWindowRand_N

func (r *Room) AddWindowRand_N(rnd *g2rand.G2Rand, wallrect rect.Rect, wintile tile_flag.TileFlag)

func (*Room) AddWindowRand_S

func (r *Room) AddWindowRand_S(rnd *g2rand.G2Rand, wallrect rect.Rect, wintile tile_flag.TileFlag)

func (*Room) AddWindowRand_W

func (r *Room) AddWindowRand_W(rnd *g2rand.G2Rand, wallrect rect.Rect, wintile tile_flag.TileFlag)

func (*Room) DrawMaze

func (r *Room) DrawMaze(rnd *g2rand.G2Rand, xn, yn int, walltile tile_flag.TileFlag, connerFill bool) error

func (*Room) DrawRectWall

func (r *Room) DrawRectWall(rnd *g2rand.G2Rand, walltile tile_flag.TileFlag, terrace bool) error

func (*Room) DrawWall_E

func (r *Room) DrawWall_E(wallrect rect.Rect, walltile tile_flag.TileFlag)

func (*Room) DrawWall_N

func (r *Room) DrawWall_N(wallrect rect.Rect, walltile tile_flag.TileFlag)

func (*Room) DrawWall_S

func (r *Room) DrawWall_S(wallrect rect.Rect, walltile tile_flag.TileFlag)

func (*Room) DrawWall_W

func (r *Room) DrawWall_W(wallrect rect.Rect, walltile tile_flag.TileFlag)

func (*Room) GetUUID

func (r *Room) GetUUID() string

func (*Room) RndDoorOuter

func (r *Room) RndDoorOuter(rnd *g2rand.G2Rand) [2]int

func (*Room) RndPos

func (r *Room) RndPos(rnd *g2rand.G2Rand) (int, int)

func (Room) String

func (r Room) String() string

func (*Room) StringForm

func (info *Room) StringForm() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL