Roguelike
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Public Attributes | List of all members
Block Class Reference

Public Member Functions

 Block ()
 
 Block (const Block &)
 
 Block (int _tl_x, int _tl_y, int _height, int _width)
 
void generate_buildings ()
 
std::vector< Building > & get_buildings ()
 
int get_height ()
 
int get_width ()
 
int get_x ()
 
int get_y ()
 

Public Attributes

IntPoint tl
 
int height
 
int width
 
std::vector< Buildingbuildings
 

Constructor & Destructor Documentation

Block::Block ( )

Empty constructor.

Block::Block ( const Block r)

Copy constructor.

Block::Block ( int  _tl_x,
int  _tl_y,
int  _height,
int  _width 
)
Parameters
_tlthe top-left corner of the room relative to the settlment
_brthe bottom-right corner of the room relative to its parent dungeon

Creates a new Block.

Member Function Documentation

void Block::generate_buildings ( )

Generates houses inside of the block.

std::vector< Building > & Block::get_buildings ( )

Accessor for buildings.

int Block::get_height ( )

Accessor for the height.

int Block::get_width ( )

Accessor for the width.

int Block::get_x ( )

Accessor for the x coord.

int Block::get_y ( )

Accessor for the y coord.

Member Data Documentation

std::vector<Building> Block::buildings

A list of buildings inside of the block.

int Block::height

The height of the room.

IntPoint Block::tl

The top left corner of the room relative to its parent dungeon.

int Block::width

The width of the room.


The documentation for this class was generated from the following files: