Chess
Classes
chessboard.h File Reference

Creates, stores, and makes changes to data for a game state. More...

#include <memory>
#include <optional>
#include <set>
#include <vector>
#include "graphics.h"
#include "piece.h"
Include dependency graph for chessboard.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Tile
 Comprises a Chessboard's game state, can hold a Piece. More...
 
class  Chessboard
 Used to create, store, and make changes to a game state. More...
 

Detailed Description

Creates, stores, and makes changes to data for a game state.

The chessboard files are used to create, store, and make changes to data for a game state. Each game state is comprised of Tiles, and each Tile is able to have a Piece. It also has member functions that handle possible moves calculated in the piece files. The Chessboard class also differentiates between pseudo-legal moves and legal moves. This is done inside the is_valid_move() for testing one Piece's moves, and also in the is_checkmate() function which finds all legal moves for a given side.