Chess
chessboard.cpp File Reference

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

#include "chessboard.h"
#include <iostream>
#include <string>
#include "piece.h"
Include dependency graph for chessboard.cpp:

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.