fmt: reformatted code, changed some function signatures, fairly minor
This commit is contained in:
parent
76c0c3ce8b
commit
21fae88bdb
5 changed files with 216 additions and 50 deletions
|
|
@ -68,7 +68,7 @@ class Piece {
|
|||
Piece(PieceColour pColour) : colour(pColour) {
|
||||
}
|
||||
virtual ~Piece();
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const;
|
||||
|
||||
PieceColour getColour() const {
|
||||
return colour;
|
||||
|
|
@ -101,9 +101,9 @@ class King : public Piece {
|
|||
pieceSymbol = 'K';
|
||||
pieceType = KING;
|
||||
}
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const override;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const override;
|
||||
|
||||
bool checkForCheck() const;
|
||||
bool checkForCheck(Board &board) const;
|
||||
|
||||
bool checkForCastle(enum CastleSide side) const {
|
||||
if(side == KINGSIDE)
|
||||
|
|
@ -130,7 +130,7 @@ class Rook : public Piece {
|
|||
pieceSymbol = 'R';
|
||||
pieceType = ROOK;
|
||||
}
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const override;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const override;
|
||||
};
|
||||
|
||||
class Queen : public Piece {
|
||||
|
|
@ -142,7 +142,7 @@ class Queen : public Piece {
|
|||
pieceSymbol = 'Q';
|
||||
pieceType = QUEEN;
|
||||
}
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const override;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const override;
|
||||
};
|
||||
|
||||
class Knight : public Piece {
|
||||
|
|
@ -154,7 +154,7 @@ class Knight : public Piece {
|
|||
pieceSymbol = 'N';
|
||||
pieceType = KNIGHT;
|
||||
}
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const override;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const override;
|
||||
};
|
||||
|
||||
class Bishop : public Piece {
|
||||
|
|
@ -166,7 +166,7 @@ class Bishop : public Piece {
|
|||
pieceSymbol = 'B';
|
||||
pieceType = BISHOP;
|
||||
}
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const override;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const override;
|
||||
};
|
||||
|
||||
class Pawn : public Piece {
|
||||
|
|
@ -178,7 +178,7 @@ class Pawn : public Piece {
|
|||
pieceSymbol = 'P';
|
||||
pieceType = PAWN;
|
||||
}
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, const Board &board) const override;
|
||||
virtual std::vector<Move> getLegalMoves(const Square &from, Board &board) const override;
|
||||
};
|
||||
#endif // PIECE_HPP
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue