関数

ネームスペース osl::move_generator::detail

関数

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になる場合以外は手を生成しない.
template<osl::Player P, class Action >
void generateMoveToPtypeMaskWithPieceMask (const NumEffectState &state, Square to, Piece toP, Action &action, unsigned int ptypeMask, PieceMask pieceMask)
 あるマスに利きを持つすべての駒の中で, ptypeMaskで指定されたptypeになる場合は移動する手を生成する
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が生まれるかどうか?
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()
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 &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()
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 &notPieceMask)
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でないこともある.
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)

関数

template<osl::Player P>
bool osl::move_generator::detail::blockingU ( const NumEffectState &  state,
Square  pos 
)
template<Player P, Ptype T, class Action >
void osl::move_generator::detail::generateBishopLongMove ( const NumEffectState &  state,
Square  target,
Action &  action,
Piece  p,
int  num 
)
template<osl::Player P, Ptype T, class Action >
void osl::move_generator::detail::generateBishopLongMoveNotKing ( const NumEffectState &  state,
Square  target,
Action &  action,
CArray< unsigned char, 8 > const &  pieceMobility,
Piece  p,
int  num 
)
template<osl::Player P, int DirType, class Action >
void osl::move_generator::detail::generateDir ( const NumEffectState &  state,
Square  target,
Action &  action,
bool &  hasPawnCheckmate,
Offset  dirOffset,
Direction  Dir,
Direction  primDir,
int  ptypeMaskNotKing 
)
template<osl::Player P, int DirType, class Action , Direction Dir>
void osl::move_generator::detail::generateDir ( const NumEffectState &  state,
Square  target,
Action &  action,
bool &  hasPawnCheckmate 
)

addEffectWithEffect.tcc190 行で定義されています。

template<osl::Player P, int DirType, class Action , Direction Dir>
void osl::move_generator::detail::generateDirNotKing ( const NumEffectState &  state,
Square  target,
Action &  action,
CArray< unsigned char, 8 > &  pieceMobility,
int &  spaces,
PieceMask const &  notPieceMask 
)

addEffectWithEffect.tcc321 行で定義されています。

template<osl::Player P, int DirType, class Action >
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 
)
template<osl::Player P, class Action >
void osl::move_generator::detail::generateDrop ( Square  target,
Action &  action,
int  spaceMask,
osl::Ptype  T,
int  dirMask,
Offset  offset 
)

addEffectWithEffect.tcc360 行で定義されています。

template<Player P, class Action , bool allEmpty>
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でないこともある.

addEffectWithEffect.tcc853 行で定義されています。

参照先 osl::BISHOP, osl::Piece::isEmpty(), と osl::SimpleState::pieceAt().

template<osl::Player P, class Action , Direction Dir>
void osl::move_generator::detail::generateDropDir ( Square  target,
Action &  action,
int  spaceMask,
osl::Ptype  T 
)

addEffectWithEffect.tcc368 行で定義されています。

template<Player P, class Action >
void osl::move_generator::detail::generateDropGold ( const NumEffectState &  state,
Square  target,
Action &  action,
int  spaces 
)

addEffectWithEffect.tcc824 行で定義されています。

参照先 osl::D, osl::GOLD, osl::SimpleState::hasPieceOnStand(), osl::L, と osl::UR.

template<Player P, class Action , bool allEmpty>
void osl::move_generator::detail::generateDropRook ( const NumEffectState &  state,
Square  target,
Action &  action,
Square  l,
Square  r,
Square  d,
Square  u 
)

addEffectWithEffect.tcc874 行で定義されています。

参照先 osl::Piece::isEmpty(), osl::SimpleState::pieceAt(), と osl::ROOK.

template<Player P, class Action >
void osl::move_generator::detail::generateDropSilver ( const NumEffectState &  state,
Square  target,
Action &  action,
int  spaces 
)

addEffectWithEffect.tcc837 行で定義されています。

参照先 osl::DL, osl::SimpleState::hasPieceOnStand(), osl::SILVER, と osl::UR.

template<osl::Player P, class Action >
void osl::move_generator::detail::generateKing ( const NumEffectState &  state,
Square  target,
Action &  action,
bool &  hasPawnCheckmate 
)
template<osl::Player P, class Action >
void osl::move_generator::detail::generateKnightAll ( const NumEffectState &  state,
Square  target,
Action &  action 
)

addEffectWithEffect.tcc348 行で定義されています。

参照先 osl::SimpleState::hasPieceOnStand(), と osl::KNIGHT.

template<osl::Player P, osl::Direction Dir, class Action , bool hasKnight>
void osl::move_generator::detail::generateKnightDir ( const NumEffectState &  state,
Square  target,
Action &  action 
)
template<osl::Player P, class Action >
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は排除済み

addEffectWithEffect.tcc30 行で定義されています。

参照先 osl::Square::canPromote(), osl::canPromote(), osl::Piece::isOnBoardByOwner(), osl::SimpleState::pieceAt(), osl::promote(), osl::Piece::ptype(), と osl::Piece::square().

template<osl::Player P, class Action >
void osl::move_generator::detail::generateMoveToPtypeMask ( const NumEffectState &  state,
Square  to,
Piece  toP,
Action &  action,
unsigned int  ptypeMask 
)
template<osl::Player P, class Action >
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手もない場合もある.

addEffectWithEffect.tcc58 行で定義されています。

参照先 osl::alt(), osl::PieceMask::any(), osl::Board_Table, osl::NumEffectState::hasEffectAt(), osl::KING, osl::SimpleState::kingSquare(), osl::SimpleState::pieceOf(), osl::NumEffectState::pinnedDir(), osl::NumEffectState::pinOrOpen(), osl::primDir(), osl::primDirUnsafe(), osl::PieceMask::reset(), osl::Piece::square(), と osl::PieceMask::test().

template<osl::Player P, class Action >
void osl::move_generator::detail::generateNotKing ( const NumEffectState &  state,
Square  target,
Action &  action 
)
template<Player P, class Action , bool mustCareSilver>
void osl::move_generator::detail::generateOpenOrCapture ( const NumEffectState &  state,
Square  target,
Piece  p,
int  num,
Action &  action 
)
template<osl::Player P, class Action >
void osl::move_generator::detail::generateRookLongMove ( const NumEffectState &  state,
Square  target,
Action &  action 
)
template<osl::Player P, class Action >
void osl::move_generator::detail::generateRookLongMoveNotKing ( const NumEffectState &  state,
Square  target,
Action &  action,
CArray< unsigned char, 8 > const &  pieceMobility 
)
 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義