Public Member Functions | Protected Attributes | Static Protected Attributes

GridColumn Class Reference

Grid column. More...

#include <GridColumn.h>

List of all members.

Public Member Functions

 GridColumn ()
 GridColumn (CIwFVec2 position, int tileSize)
 ~GridColumn ()
void Draw ()
bool IsFull ()
void SetFull (bool toggle)
int GetNextEmpty ()
void DecreaseNextEmpty ()
GridSquareGetSquare (int index)
void ClearColumn ()

Protected Attributes

CIwFVec2 m_position
 Position of the column (top left corner).
GridSquarem_squares [m_numRows]
 Array of squares.
int m_emptySquares
 Number of empty squares in this column.
bool m_isFull
 Are all squares in this column full?

Static Protected Attributes

static const int m_numRows = 6
 Number of rows in the column.
static const int m_numSquares = 5
 Number of squares in a row (adjusted by index 0).

Detailed Description

Grid column.

A column in the grid.


Constructor & Destructor Documentation

GridColumn::GridColumn (  )  [inline]

Default constructor.

Unused default constructor for the grid column.

GridColumn::GridColumn ( CIwFVec2  position,
int  tileSize 
)

Constructor.

Create a new grid column.

Parameters:
[in] position Position of the column (top left corner).
[in] tileSize Size of a grid tile.
GridColumn::~GridColumn (  ) 

Destructor.

Destroy the column and release all associated memory.


Member Function Documentation

void GridColumn::ClearColumn (  ) 

Clear column.

Empty all column squares.

void GridColumn::DecreaseNextEmpty (  ) 

Decrease next empty square.

Decrease the number of empty squares in the column.

void GridColumn::Draw (  ) 

Draw.

Render the grid column.

int GridColumn::GetNextEmpty (  ) 

Get next expty squre.

Return the index of the next empty square in the column.

Returns:
int index of square.
GridSquare * GridColumn::GetSquare ( int  index  ) 

Get square.

Return a specific square.

Parameters:
[in] index Index of the square to return.
Returns:
GridSquare* the grid square.
bool GridColumn::IsFull (  ) 

Is column full?

Return whether this column is full.

Returns:
bool is the column full.
void GridColumn::SetFull ( bool  toggle  ) 

Set full.

Set whether this column is full.

Parameters:
[in] toggle New state.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations