Cleanup
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
#include <iostream>
|
|
||||||
#include "MoveGenerator.hpp"
|
#include "MoveGenerator.hpp"
|
||||||
#include "Board.hpp"
|
#include "Board.hpp"
|
||||||
#include "BoardState.hpp"
|
#include "BoardState.hpp"
|
||||||
@@ -77,13 +76,9 @@ void MoveGenerator::generateKingMoves(const BoardState &bs, const Square &from,
|
|||||||
BitBoard target = CastlingRanks | bs.occupiedBB;
|
BitBoard target = CastlingRanks | bs.occupiedBB;
|
||||||
auto attacked = generateAttackedSquares(bs, target, !bs.turn);
|
auto attacked = generateAttackedSquares(bs, target, !bs.turn);
|
||||||
|
|
||||||
std::cout << "attacked\n" << attacked;
|
|
||||||
|
|
||||||
movesBB |= BitBoard::castlingMoves(fromBB & ~attacked,
|
movesBB |= BitBoard::castlingMoves(fromBB & ~attacked,
|
||||||
(*bs.pieceBBs)[Board::toIndex(PieceType::Rook)],
|
(*bs.pieceBBs)[Board::toIndex(PieceType::Rook)],
|
||||||
~bs.occupiedBB)
|
~bs.occupiedBB) & castlingRank;
|
||||||
& castlingRank;
|
|
||||||
std::cout << "moves\n" << movesBB;
|
|
||||||
|
|
||||||
if ((checkCR & CastlingRights::KingSide) == CastlingRights::None) {
|
if ((checkCR & CastlingRights::KingSide) == CastlingRights::None) {
|
||||||
movesBB &= ~GFile;
|
movesBB &= ~GFile;
|
||||||
|
Reference in New Issue
Block a user