#include <GridColumn.h>
Public Member Functions | |
GridColumn () | |
GridColumn (CIwFVec2 position, int tileSize) | |
~GridColumn () | |
void | Draw () |
bool | IsFull () |
void | SetFull (bool toggle) |
int | GetNextEmpty () |
void | DecreaseNextEmpty () |
GridSquare * | GetSquare (int index) |
void | ClearColumn () |
Protected Attributes | |
CIwFVec2 | m_position |
Position of the column (top left corner). | |
GridSquare * | m_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). |
Grid column.
A column in the grid.
GridColumn::GridColumn | ( | ) | [inline] |
Default constructor.
Unused default constructor for the grid column.
GridColumn::GridColumn | ( | CIwFVec2 | position, | |
int | tileSize | |||
) |
Constructor.
Create a new grid column.
[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.
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.
GridSquare * GridColumn::GetSquare | ( | int | index | ) |
Get square.
Return a specific square.
[in] | index | Index of the square to return. |
bool GridColumn::IsFull | ( | ) |
Is column full?
Return whether this column is full.
void GridColumn::SetFull | ( | bool | toggle | ) |
Set full.
Set whether this column is full.
[in] | toggle | New state. |