|
Queen Class Reference#include <Queen.h>
List of all members.
Detailed Description
The Queen class.
Definition at line 22 of file Queen.h.
Constructor & Destructor Documentation
|
Puts queen in upper left corner of board. |
Queen::Queen |
( |
int |
inRow, |
|
|
int |
inCol |
|
) |
|
|
|
Places Queen in supplied location. |
Member Function Documentation
int Queen::getCol |
( |
|
) |
const |
|
int Queen::getRow |
( |
|
) |
const |
|
bool Queen::isUnderAttack |
( |
|
) |
const |
|
|
Determines whether the queen is under attack by another queen. - Returns:
- If there is a queen in the same row or the same diagonal, returns true; otherwise, returns false.
|
static void Queen::setBoard |
( |
const Board * |
bPtr |
) |
[static] |
|
|
Saves a pointer to the board for all queens. |
Member Data Documentation
|
Row (or prospective row) of queen if it is on the board.
Definition at line 47 of file Queen.h. |
|
Column (or prospective column) of queen if it is on the board.
Definition at line 49 of file Queen.h. |
|
All queens share the same board.
Definition at line 52 of file Queen.h. |
The documentation for this class was generated from the following file:
|