Compare commits

..

No commits in common. "d59798b7e8f4d196bfd7edb988c0ac950f5993e9" and "a1560f1611354f4c9a8a2dd0cbb160413f340ba1" have entirely different histories.

6 changed files with 12 additions and 38 deletions

4
.gitignore vendored
View file

@ -23,7 +23,8 @@
*.debug
*.yml
html/
nbproject/*
nbproject/private/
nbproject/Package-*.bash
build/
nbbuild/
dist/
@ -42,4 +43,3 @@ localTest/
docs/
.ca/
*.kate-swp
*orig

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "doxygen-awesome-css"]
path = doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git

View file

@ -540,13 +540,13 @@ EXTRACT_ALL = YES
# be included in the documentation.
# The default value is: NO.
EXTRACT_PRIVATE = YES
EXTRACT_PRIVATE = NO
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
# methods of a class will be included in the documentation.
# The default value is: NO.
EXTRACT_PRIV_VIRTUAL = YES
EXTRACT_PRIV_VIRTUAL = NO
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
@ -1146,7 +1146,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).
IMAGE_PATH = docs/images
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that Doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
@ -1456,7 +1456,7 @@ HTML_STYLESHEET =
# documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
HTML_EXTRA_STYLESHEET =
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@ -1479,7 +1479,7 @@ HTML_EXTRA_FILES =
# The default value is: AUTO_LIGHT.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_COLORSTYLE = LIGHT
HTML_COLORSTYLE = AUTO_LIGHT
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to

@ -1 +0,0 @@
Subproject commit 60366c3d0423a7181e94a0cfab404f0422eca3c7

View file

@ -6,14 +6,6 @@
// This Source Code Form is "Incompatible With Secondary Licenses", as
// defined by the Mozilla Public License, v. 2.0.
/** @file Board.hpp
* @brief The header file for the Board class
*
* This contains the class definition for the logical representation of the chessboard
* itself, as well as a few ancillary enums and forward declarations to make the code
* easier to read (hopefully). Unlike the Piece.hpp header, there's no inheritance
* or virtual functions so this "half" of the code is a bit simpler to follow.
*/
#ifndef BOARD_HPP
#define BOARD_HPP
@ -22,29 +14,16 @@
#include <string>
#include <vector>
#include "Piece.hpp"
// suggested to forward declare here, and put include in the .cpp
class Piece;
/** @enum Players
* @brief An enum for the white and black players
*/
enum Players { PL_WHITE, PL_BLACK };
struct Square;
/** @class Board Board.hpp inc/Board.hpp
* @brief This class abstracts the chess board itself
*
* The heart of the entire code is contained in the member variable boardGrid, which
* is a representation of the board. It's a 2D vector of Pieces, which are stored using
* smart pointers. When other functions want to view the board, they do so with the included
* getPieceAt() getters, which return raw pointers so ownership isn't transferred.
*
* Outside functions/methods can also change the state of the board with setPieceAt() which
* can allow one to move a piece (empty squares being nullptr) or add pieces to the Board when
* required.
*/
class Board {
private:
std::vector<std::vector<std::unique_ptr<Piece>>> boardGrid; /**< This holds the game state. It is a 2D vector of Piece types, or nullptr for empty squares @image html boardGrid.png "Logical diagram of boardGrid vector" */
friend class Piece; // this doesn't seem to do anything
std::vector<std::vector<std::unique_ptr<Piece>>> boardGrid;
Players playerTurn;
// let's get super object-oriented, baby
// these help the getters and setters access the boardGrid
@ -69,7 +48,6 @@ class Board {
virtual ~Board();
// These are to allow Piece to access Board in a controlled way
// instead of adding a friend declaration for every subclass
// ----- Getters -----
Piece* getPieceAt(int r, int f) {
return at(r, f).get();

View file

@ -75,7 +75,7 @@ struct Move {
};
/**
* @class Piece Piece.hpp inc/Piece.hpp
* @class Piece Piece.hpp "inc/Piece.hpp"
* @brief A class abstracting chess pieces
*
* This is a polymorphic base class containing the basic properties all chess pieces have.