granatier
#include <arena.h>
This class represents the Arena of the game.
Definition at line 36 of file arena.h.
void Arena::addPlayerPosition |
( |
const QPointF & |
p_position | ) |
|
Sets a player position on the arena.
- Parameters
-
p_position | the player position |
Definition at line 90 of file arena.cpp.
Cell Arena::getCell |
( |
const int |
p_row, |
|
|
const int |
p_column |
|
) |
| const |
Gets the Cell at the given coordinates.
- Parameters
-
p_row | the row index |
p_column | the column index |
- Returns
- the Cell at the given row and column
Definition at line 120 of file arena.cpp.
int Arena::getColFromX |
( |
const qreal |
p_x | ) |
const |
Gets the column index corresponding to the given x-coordinate.
- Parameters
-
p_x | the x-coordinate to convert into column index |
- Returns
- the column index corresponding to the given x-coordinate
Definition at line 154 of file arena.cpp.
QPoint Arena::getCoords |
( |
Cell * |
p_cell | ) |
const |
Gets the coordinates of the given Cell as a QPoint.
- Parameters
-
- Returns
- the row and column of the given Cell
Definition at line 129 of file arena.cpp.
QString Arena::getName |
( |
| ) |
const |
Returns the Arean name.
- Returns
- the Arena name
Definition at line 53 of file arena.cpp.
int Arena::getNbColumns |
( |
| ) |
const |
Gets the number of columns of the Arena.
- Returns
- the number of columns
Definition at line 164 of file arena.cpp.
int Arena::getNbRows |
( |
| ) |
const |
Gets the number of rows of the Arena.
- Returns
- the number of rows
Definition at line 169 of file arena.cpp.
QPointF Arena::getPlayerPosition |
( |
int |
p_player | ) |
const |
Gets the player position on the arena.
- Parameters
-
p_player | the player number |
- Returns
- p_position the player position
Definition at line 111 of file arena.cpp.
int Arena::getRowFromY |
( |
const qreal |
p_y | ) |
const |
Gets the row index corresponding to the given y-coordinate.
- Parameters
-
p_y | the y-coordinate to convert into row index |
- Returns
- the row index corresponding to the given y-coordinate
Definition at line 144 of file arena.cpp.
void Arena::init |
( |
const int |
p_nbRows, |
|
|
const int |
p_nbColumns |
|
) |
| |
Creates the Arena matrix.
- Parameters
-
p_nbRows | the number of rows |
p_nbColumns | the number of columns |
Definition at line 40 of file arena.cpp.
void Arena::removeCellElement |
( |
const int |
p_row, |
|
|
const int |
p_column, |
|
|
Element * |
p_element |
|
) |
| |
Removes the Element that is on the Cell whose coordinates are given in parameters.
- Parameters
-
Definition at line 81 of file arena.cpp.
void Arena::setCellElement |
( |
const int |
p_row, |
|
|
const int |
p_column, |
|
|
Element * |
p_element |
|
) |
| |
Sets the Element that is on the Cell whose coordinates are given in parameters.
- Parameters
-
Definition at line 72 of file arena.cpp.
Sets the CellType of the Cell whose coordinates are given in parameters.
- Parameters
-
p_row | the Cell row |
p_column | the Cell column |
p_type | the Cell type |
Definition at line 63 of file arena.cpp.
void Arena::setName |
( |
const QString & |
p_strArenaName | ) |
|
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:51 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.