chessCAMO
|
Public Member Functions | |
void | formPieces (vector< Sprite > &pieces, const vector< Sprite > &pieceType, const vector< Piece * > &board) |
Forms the pieces for the current board representation. More... | |
void | formReservoir (vector< Sprite > &reservoir, const vector< Sprite > &pieceType) |
Forms the piece reservoir. More... | |
void | drawText (RenderWindow &window, Text &text_object, string message, int size, unsigned int pos_x, unsigned int pos_y, Font font, Color color, unsigned int style) |
Draws text to the screen according to the provided parameters. More... | |
void | drawRect (RenderWindow &window, RectangleShape &rect_object, float width, float height, unsigned int pos_x, unsigned int pos_y, Color color, int out_thick, Color out_color) |
Draws a rectangle in the interface window. More... | |
void | getLegalMoves (vector< int > &legalMoves, int src, Chess &chess) |
Gets the squares of legal moves. More... | |
void | getSideToMoveSquares (vector< int > &sideSquares, Chess &chess) |
Gets the squares of all pieces that match the turn type. More... | |
void | resetPosition (string file_status, string file_promotion, string message, int move_num, Chess &chess, vector< int > &sideSquares) |
Resets the position to the corresponding position indicated by 'move_num'. More... | |
void | streamIO (string file_path, string message, bool draw_or_resign, Chess &chess) |
Writes data to an output stream (file) and reads in data from an input stream (file) as need. Used for promotion and warning messages. More... | |
|
inline |
Forms the pieces for the current board representation.
pieces | The pieces to draw on the board | |
[in] | pieceType | The piece type from which the drawn piece image is obtained |
[in] | board | The current board representation |
|
inline |
Forms the piece reservoir.
reservoir | The piece reservoir | |
[in] | pieceType | The piece type from which the drawn piece image is obtained |
|
inline |
Draws text to the screen according to the provided parameters.
window | The window on which to draw | |
text_object | The text object that is used | |
[in] | message | The message to write |
[in] | size | The size of the characters |
[in] | pos_x | The x position on the screen |
[in] | pos_y | The y position on the screen |
[in] | font | The font to use |
[in] | color | The color that the text will be |
[in] | style | The text's style |
|
inline |
Draws a rectangle in the interface window.
window | The window on which to draw | |
rect_object | The rectangle object that is used | |
[in] | width | The width of the rectangle |
[in] | height | The height of the rectangle |
[in] | pos_x | The x position on the screen |
[in] | pos_y | The y position on the screen |
[in] | color | The color that the rectangle will be filled with |
[in] | out_thick | The outline thickness (negative values go toward the center of rectangle) |
[in] | out_color | The outline color |
|
inline |
Gets the squares of legal moves.
legalMoves | The legal moves vector | |
[in] | src | The piece's source square |
chess | The chess object |
|
inline |
Gets the squares of all pieces that match the turn type.
sideSquares | The squares of the side whose turn it is currently. |
chess | The chess object |
|
inline |
Resets the position to the corresponding position indicated by 'move_num'.
[in] | file_status | The file path for status information |
[in] | file_promotion | The file path for promotion information |
[in] | message | The message to use as a warning |
[in] | move_num | The move number to revert the position to |
chess | The chess object | |
sideSquares | The squares of pieces whose turn it will be (updated by reference) |
|
inline |
Writes data to an output stream (file) and reads in data from an input stream (file) as need. Used for promotion and warning messages.
[in] | file_path | The file path to read/write from |
[in] | message | The message to write |
[in] | draw_or_resign | Whether to apply the drawOrResign function |
chess | The chess object |