Functions | |
template<osl::Player P, class Action > | |
void | generateMovePiecePtypeMask (const NumEffectState &state, Piece p, Square to, Piece toP, Action &action, unsigned int ptypeMask) |
マスtoに移動可能な駒pを移動する手を生成する. ptypeMaskで指定されたptypeになる場合以外は手を生成しない. More... | |
template<osl::Player P, class Action > | |
void | generateMoveToPtypeMaskWithPieceMask (const NumEffectState &state, Square to, Piece toP, Action &action, unsigned int ptypeMask, PieceMask pieceMask) |
あるマスに利きを持つすべての駒の中で, ptypeMaskで指定されたptypeになる場合は移動する手を生成する More... | |
template<osl::Player P, class Action > | |
void | generateMoveToPtypeMask (const NumEffectState &state, Square to, Piece toP, Action &action, unsigned int ptypeMask) |
template<osl::Player P> | |
bool | blockingU (const NumEffectState &state, Square pos) |
敵玉の前に歩を置いた場合に遮った利きで敵玉にlibertyが生まれるかどうか? More... | |
template<osl::Player P, int DirType, class Action > | |
void | generateDir (const NumEffectState &state, Square target, Action &action, bool &hasPawnCheckmate, Offset dirOffset, Direction Dir, Direction primDir, int ptypeMaskNotKing) |
int DirType : 0 - U 1 - LRD 2 - UL,UR,DL,DR dirOffset = DirectionPlayerTraits<Dir,P>::offset() More... | |
template<osl::Player P, int DirType, class Action , Direction Dir> | |
void | generateDir (const NumEffectState &state, Square target, Action &action, bool &hasPawnCheckmate) |
template<osl::Player P, int DirType, class Action > | |
void | generateDirNotKing (const NumEffectState &state, Square target, Action &action, CArray< unsigned char, 8 > &pieceMobility, int &spaces, PieceMask const ¬PieceMask, Offset dirOffset, Direction Dir, Direction primDir, int ptypeMask, Direction dirByBlack) |
int DirType : 0 - U 1 - LRD 2 - UL,UR,DL,DR dirOffset = DirectionPlayerTraits<Dir,P>::offset() More... | |
template<osl::Player P, int DirType, class Action , Direction Dir> | |
void | generateDirNotKing (const NumEffectState &state, Square target, Action &action, CArray< unsigned char, 8 > &pieceMobility, int &spaces, PieceMask const ¬PieceMask) |
template<osl::Player P, osl::Direction Dir, class Action , bool hasKnight> | |
void | generateKnightDir (const NumEffectState &state, Square target, Action &action) |
template<osl::Player P, class Action > | |
void | generateKnightAll (const NumEffectState &state, Square target, Action &action) |
template<osl::Player P, class Action > | |
void | generateDrop (Square target, Action &action, int spaceMask, osl::Ptype T, int dirMask, Offset offset) |
template<osl::Player P, class Action , Direction Dir> | |
void | generateDropDir (Square target, Action &action, int spaceMask, osl::Ptype T) |
template<Player P, class Action , bool mustCareSilver> | |
void | generateOpenOrCapture (const NumEffectState &state, Square target, Piece p, int num, Action &action) |
template<osl::Player P, class Action > | |
void | generateRookLongMove (const NumEffectState &state, Square target, Action &action) |
template<osl::Player P, class Action > | |
void | generateRookLongMoveNotKing (const NumEffectState &state, Square target, Action &action, CArray< unsigned char, 8 > const &pieceMobility) |
template<Player P, Ptype T, class Action > | |
void | generateBishopLongMove (const NumEffectState &state, Square target, Action &action, Piece p, int num) |
template<osl::Player P, Ptype T, class Action > | |
void | generateBishopLongMoveNotKing (const NumEffectState &state, Square target, Action &action, CArray< unsigned char, 8 > const &pieceMobility, Piece p, int num) |
template<Player P, class Action > | |
void | generateDropGold (const NumEffectState &state, Square target, Action &action, int spaces) |
template<Player P, class Action > | |
void | generateDropSilver (const NumEffectState &state, Square target, Action &action, int spaces) |
template<Player P, class Action , bool allEmpty> | |
void | generateDropBishop (const NumEffectState &state, Square target, Action &action, Square ul, Square dr, Square ur, Square dl) |
allEmpty - shadow attackを生成する場合は,posがemptyでないこともある. More... | |
template<Player P, class Action , bool allEmpty> | |
void | generateDropRook (const NumEffectState &state, Square target, Action &action, Square l, Square r, Square d, Square u) |
template<osl::Player P, class Action > | |
void | generateKing (const NumEffectState &state, Square target, Action &action, bool &hasPawnCheckmate) |
template<osl::Player P, class Action > | |
void | generateNotKing (const NumEffectState &state, Square target, Action &action) |
bool osl::move_generator::detail::blockingU | ( | const NumEffectState & | state, |
Square | pos | ||
) |
敵玉の前に歩を置いた場合に遮った利きで敵玉にlibertyが生まれるかどうか?
Definition at line 97 of file addEffectWithEffect.tcc.
References osl::BLACK, osl::Board_Table, osl::Piece::canMoveOn(), osl::BoardTable::getShortOffset(), osl::Square::square, and osl::Square::y().
void osl::move_generator::detail::generateBishopLongMove | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
Piece | p, | ||
int | num | ||
) |
Definition at line 644 of file addEffectWithEffect.tcc.
References osl::BISHOP, osl::Piece::canMoveOn(), osl::DL, osl::DR, osl::Square::isOnBoard(), osl::Square::makeNoCheck(), osl::eval::max(), osl::eval::min(), osl::Piece::square(), target, osl::Square::uintValue(), osl::UL, osl::UR, osl::Square::x(), and osl::Square::y().
void osl::move_generator::detail::generateBishopLongMoveNotKing | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
CArray< unsigned char, 8 > const & | pieceMobility, | ||
Piece | p, | ||
int | num | ||
) |
Definition at line 739 of file addEffectWithEffect.tcc.
References osl::Piece::canMoveOn(), osl::DL, osl::DR, osl::Square::isOnBoard(), osl::Square::makeDirect(), osl::Square::makeNoCheck(), osl::eval::max(), osl::eval::min(), osl::PBISHOP, osl::Piece::square(), osl::Square::uintValue(), osl::UL, osl::UR, osl::Square::x(), and osl::Square::y().
void osl::move_generator::detail::generateDir | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
bool & | hasPawnCheckmate, | ||
Offset | dirOffset, | ||
Direction | Dir, | ||
Direction | primDir, | ||
int | ptypeMaskNotKing | ||
) |
int DirType : 0 - U 1 - LRD 2 - UL,UR,DL,DR dirOffset = DirectionPlayerTraits<Dir,P>::offset()
Definition at line 125 of file addEffectWithEffect.tcc.
References osl::Piece::EMPTY(), osl::Piece::isEmpty(), osl::Square::isOnBoard(), osl::Piece::isOnBoardByOwner(), osl::LANCE, osl::PAWN, osl::primDir(), osl::Piece::square(), and osl::Square::x().
void osl::move_generator::detail::generateDir | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
bool & | hasPawnCheckmate | ||
) |
Definition at line 191 of file addEffectWithEffect.tcc.
References target.
void osl::move_generator::detail::generateDirNotKing | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
CArray< unsigned char, 8 > & | pieceMobility, | ||
int & | spaces, | ||
PieceMask const & | notPieceMask, | ||
Offset | dirOffset, | ||
Direction | Dir, | ||
Direction | primDir, | ||
int | ptypeMask, | ||
Direction | dirByBlack | ||
) |
int DirType : 0 - U 1 - LRD 2 - UL,UR,DL,DR dirOffset = DirectionPlayerTraits<Dir,P>::offset()
Definition at line 203 of file addEffectWithEffect.tcc.
References osl::BISHOP, osl::Piece::canMoveOn(), osl::inverse(), osl::Piece::isEmpty(), osl::Square::isOnBoard(), osl::Piece::isOnBoardByOwner(), osl::Square::isUD(), osl::LANCE, osl::Piece::number(), osl::PAWN, osl::primDir(), osl::Piece::ptype(), osl::ROOK, osl::Piece::square(), target, osl::Square::uintValue(), and osl::Square::x().
void osl::move_generator::detail::generateDirNotKing | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
CArray< unsigned char, 8 > & | pieceMobility, | ||
int & | spaces, | ||
PieceMask const & | notPieceMask | ||
) |
Definition at line 322 of file addEffectWithEffect.tcc.
References target.
void osl::move_generator::detail::generateDrop | ( | Square | target, |
Action & | action, | ||
int | spaceMask, | ||
osl::Ptype | T, | ||
int | dirMask, | ||
Offset | offset | ||
) |
Definition at line 361 of file addEffectWithEffect.tcc.
void osl::move_generator::detail::generateDropBishop | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
Square | ul, | ||
Square | dr, | ||
Square | ur, | ||
Square | dl | ||
) |
allEmpty - shadow attackを生成する場合は,posがemptyでないこともある.
Definition at line 854 of file addEffectWithEffect.tcc.
References osl::BISHOP, and target.
void osl::move_generator::detail::generateDropDir | ( | Square | target, |
Action & | action, | ||
int | spaceMask, | ||
osl::Ptype | T | ||
) |
Definition at line 369 of file addEffectWithEffect.tcc.
References target.
void osl::move_generator::detail::generateDropGold | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
int | spaces | ||
) |
void osl::move_generator::detail::generateDropRook | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
Square | l, | ||
Square | r, | ||
Square | d, | ||
Square | u | ||
) |
Definition at line 875 of file addEffectWithEffect.tcc.
void osl::move_generator::detail::generateDropSilver | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
int | spaces | ||
) |
Definition at line 838 of file addEffectWithEffect.tcc.
References osl::DL, osl::DR, osl::SILVER, target, osl::U, osl::UL, and osl::UR.
void osl::move_generator::detail::generateKing | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
bool & | hasPawnCheckmate | ||
) |
Definition at line 895 of file addEffectWithEffect.tcc.
References osl::BISHOP, osl::D, osl::DL, osl::DR, osl::Piece::isOnBoardByOwner(), osl::Piece::isPromoted(), osl::L, osl::R, osl::ROOK, target, osl::U, osl::UL, and osl::UR.
Referenced by osl::move_generator::AddEffect< P, isAttackToKing >::generate().
void osl::move_generator::detail::generateKnightAll | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action | ||
) |
Definition at line 349 of file addEffectWithEffect.tcc.
References osl::KNIGHT, and target.
void osl::move_generator::detail::generateKnightDir | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action | ||
) |
Definition at line 329 of file addEffectWithEffect.tcc.
References osl::Piece::canMoveOn(), osl::Piece::isEmpty(), osl::Square::isOnBoard(), osl::KNIGHT, and osl::Piece::square().
void osl::move_generator::detail::generateMovePiecePtypeMask | ( | const NumEffectState & | state, |
Piece | p, | ||
Square | to, | ||
Piece | toP, | ||
Action & | action, | ||
unsigned int | ptypeMask | ||
) |
マスtoに移動可能な駒pを移動する手を生成する. ptypeMaskで指定されたptypeになる場合以外は手を生成しない.
state | - 盤面 |
p | - 利きを持つコマ |
to | - 目的のマス |
toP | - 目的のマスに現在ある駒(又は空白) |
action | - 手生成のaction(典型的にはstoreかfilterつきstore) |
ptypeMask | - 移動後の駒のptypeに対応するbitが1なら手を生成する should promoteは? 呼び出す時はpinnedの場合のunsafeなdirectionは排除済み |
Definition at line 31 of file addEffectWithEffect.tcc.
References osl::canPromote(), osl::Square::canPromote(), osl::Piece::isOnBoardByOwner(), osl::promote(), osl::Piece::ptype(), and osl::Piece::square().
void osl::move_generator::detail::generateMoveToPtypeMask | ( | const NumEffectState & | state, |
Square | to, | ||
Piece | toP, | ||
Action & | action, | ||
unsigned int | ptypeMask | ||
) |
Definition at line 80 of file addEffectWithEffect.tcc.
void osl::move_generator::detail::generateMoveToPtypeMaskWithPieceMask | ( | const NumEffectState & | state, |
Square | to, | ||
Piece | toP, | ||
Action & | action, | ||
unsigned int | ptypeMask, | ||
PieceMask | pieceMask | ||
) |
あるマスに利きを持つすべての駒の中で, ptypeMaskで指定されたptypeになる場合は移動する手を生成する
state | - 盤面 |
to | - 目的のマス |
toP | - 目的のマスに現在ある駒(又は空白) |
action | - 手生成のaction(典型的にはstoreかfilterつきstore) |
ptypeMask | - 移動後の駒のptypeに対応するbitが1なら手を生成する pinnedの場合は移動する手が1手もない場合もある. |
Definition at line 59 of file addEffectWithEffect.tcc.
References osl::Board_Table, osl::KING, osl::primDir(), osl::primDirUnsafe(), and osl::Piece::square().
void osl::move_generator::detail::generateNotKing | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action | ||
) |
Definition at line 941 of file addEffectWithEffect.tcc.
References osl::BISHOP, osl::BLACK, osl::D, osl::DL, osl::DR, osl::EMPTY_NUM, osl::Piece::isOnBoardByOwner(), osl::Piece::isPromoted(), osl::L, osl::Square::makeDirect(), osl::R, osl::ROOK, target, osl::U, osl::UL, and osl::UR.
void osl::move_generator::detail::generateOpenOrCapture | ( | const NumEffectState & | state, |
Square | target, | ||
Piece | p, | ||
int | num, | ||
Action & | action | ||
) |
Definition at line 374 of file addEffectWithEffect.tcc.
References osl::BLACK, osl::Board_Table, osl::Piece::EMPTY(), osl::BoardTable::getShort8OffsetUnsafe(), osl::inverse(), osl::Piece::isPiece(), osl::Piece::pieceIsBlack(), osl::primDir(), osl::SILVER, osl::Piece::square(), target, and osl::Square::y().
void osl::move_generator::detail::generateRookLongMove | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action | ||
) |
Definition at line 413 of file addEffectWithEffect.tcc.
References osl::Piece::canMoveOn(), osl::D, osl::Square::isLR(), osl::Piece::isOnBoardByOwner(), osl::Piece::isPromoted(), osl::Square::isUD(), osl::Square::isULRD(), osl::L, osl::Square::makeNoCheck(), osl::eval::max(), osl::eval::min(), osl::PROOK, osl::R, osl::ROOK, osl::Piece::square(), target, osl::U, osl::Square::uintValue(), osl::Square::x(), and osl::Square::y().
void osl::move_generator::detail::generateRookLongMoveNotKing | ( | const NumEffectState & | state, |
Square | target, | ||
Action & | action, | ||
CArray< unsigned char, 8 > const & | pieceMobility | ||
) |
Definition at line 529 of file addEffectWithEffect.tcc.
References osl::Board_Table, osl::Piece::canMoveOn(), osl::D, osl::BoardTable::getShort8Unsafe(), osl::Piece::isOnBoardByOwner(), osl::Piece::isPromoted(), osl::Square::isULRD(), osl::L, osl::Square::makeDirect(), osl::Square::makeNoCheck(), osl::eval::max(), osl::eval::min(), osl::primDir(), osl::primDirUnsafe(), osl::PROOK, osl::R, osl::ROOK, osl::Piece::square(), osl::U, osl::Square::uintValue(), osl::Square::x(), and osl::Square::y().