Chess
Public Member Functions | Public Attributes | List of all members
Chessboard Class Reference

Used to create, store, and make changes to a game state. More...

#include <chessboard.h>

Public Member Functions

 Chessboard (Chessboard &&other)
 
Chessboardoperator= (Chessboard &&other)
 
 Chessboard (const Chessboard &other)
 
Chessboardoperator= (const Chessboard &other)
 
bool is_valid_move (int start, int end)
 
bool is_check ()
 
bool is_checkmate ()
 
bool move_piece (int start, int end)
 
void move_piece_temp (int start, int end)
 
bool in_bounds (int pos)
 
bool in_bounds (int row, int col)
 

Public Attributes

std::vector< Tilechessboard
 Game state.
 
int selected_piece_index
 Used for highlighting within graphics and also executing moves.
 
bool white_to_move
 True: white's turn | False: black's turn.
 
int w_king_index
 Store for a fast way to test for checks/mate.
 
int b_king_index
 Store for a fast way to test for checks/mate.
 
int w_num_pieces = 16
 
int b_num_pieces = 16
 

Detailed Description

Used to create, store, and make changes to a game state.


The documentation for this class was generated from the following files: