特定のpieceを動かす手を生成 [詳細]
#include <pieceOnBoard.h>
Static Public メソッド | |
template<Player P> | |
static void | generatePieceUnsafe (const NumEffectState &state, Piece p, Square target, Piece p1, Action &action) |
駒pがマスtargetに利きをもっているとして,手を生成する. | |
template<Player P> | |
static void | generatePiece (const NumEffectState &state, Piece p, Square target, Piece p1, Action &action) |
template<Player P, Ptype T> | |
static void | generatePiecePtypeUnsafe (const NumEffectState &state, Piece p, Square target, Piece p1, Action &action) |
PtypeがTの駒pがマスtargetに利きをもっているとして,手を生成する. p1 - targetにある駒. | |
template<Player P, Ptype T> | |
static void | generatePiecePtype (const NumEffectState &state, Piece p, Square target, Piece p1, Action &action) |
template<Player P, Ptype T, bool useDirMask> | |
static void | generatePtype (const NumEffectState &state, Piece p, Action &action, int dirMask=0) |
Generate moves without stating the Ptype as template param. | |
template<Player P, Ptype T> | |
static void | generatePtype (const NumEffectState &state, Piece p, Action &action) |
template<Player P, Ptype T, bool useDirMask> | |
static void | generatePtypeUnsafe (const NumEffectState &state, Piece p, Action &action, int dirMask) |
Generate moves without stating the Ptype as template param. | |
template<Player P, Ptype T> | |
static void | generatePtypeUnsafe (const NumEffectState &state, Piece p, Action &action) |
template<Player P, bool useDirMask> | |
static void | generate (const NumEffectState &state, Piece p, Action &action, int dirMask=0) |
Generate moves without stating the Ptype as template param. |
特定のpieceを動かす手を生成
pieceOnBoard.h の 19 行で定義されています。
void osl::move_generator::PieceOnBoard< Action, notPromoteCapture >::generate | ( | const NumEffectState & | state, | |
Piece | p, | |||
Action & | action, | |||
int | dirMask = 0 | |||
) | [static] |
Generate moves without stating the Ptype as template param.
自玉に王手がかかっていない時に呼ぶ.
state | - 手を作成する局面,手番はPと一致 | |
p | - 盤面上に存在するPの駒 | |
action | - 手生成用のAction |
pieceOnBoard.tcc の 371 行で定義されています。
参照先 osl::BISHOP, osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::PBISHOP, osl::PKNIGHT, osl::PLANCE, osl::PPAWN, osl::PROOK, osl::PSILVER, osl::Piece::ptype(), osl::ROOK, と osl::SILVER.
static void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiece | ( | const NumEffectState & | state, | |
Piece | p, | |||
Square | target, | |||
Piece | p1, | |||
Action & | action | |||
) | [inline, static] |
pieceOnBoard.h の 52 行で定義されています。
参照先 osl::alt(), osl::Board_Table, osl::BoardTable::getShort8Unsafe(), osl::NumEffectState::hasEffectAt(), osl::Piece::number(), osl::NumEffectState::pinnedDir(), osl::NumEffectState::pinOrOpen(), osl::primDir(), osl::primDirUnsafe(), osl::Piece::ptype(), osl::Piece::square(), と osl::PieceMask::test().
static void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtype | ( | const NumEffectState & | state, | |
Piece | p, | |||
Square | target, | |||
Piece | p1, | |||
Action & | action | |||
) | [inline, static] |
pieceOnBoard.h の 92 行で定義されています。
参照先 osl::alt(), osl::Board_Table, osl::BoardTable::getShort8Unsafe(), osl::NumEffectState::hasEffectAt(), osl::KING, osl::Piece::number(), osl::NumEffectState::pin(), osl::NumEffectState::pinnedDir(), osl::primDir(), osl::primDirUnsafe(), osl::Piece::square(), と osl::PieceMask::test().
static void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePiecePtypeUnsafe | ( | const NumEffectState & | state, | |
Piece | p, | |||
Square | target, | |||
Piece | p1, | |||
Action & | action | |||
) | [inline, static] |
PtypeがTの駒pがマスtargetに利きをもっているとして,手を生成する. p1 - targetにある駒.
pieceOnBoard.h の 73 行で定義されています。
参照先 osl::BISHOP, osl::BLACK, osl::Square::canPromote(), osl::canPromote(), osl::NumEffectState::hasEffectByPiece(), osl::KNIGHT, osl::LANCE, osl::PAWN, osl::promote(), osl::Piece::ptype(), osl::ROOK, osl::Piece::square(), と osl::Square::y().
static void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePieceUnsafe | ( | const NumEffectState & | state, | |
Piece | p, | |||
Square | target, | |||
Piece | p1, | |||
Action & | action | |||
) | [inline, static] |
駒pがマスtargetに利きをもっているとして,手を生成する.
pieceOnBoard.h の 25 行で定義されています。
参照先 osl::BLACK, osl::PtypeTable::canDropTo(), osl::Square::canPromote(), osl::canPromote(), osl::NumEffectState::hasEffectByPiece(), osl::PtypeTable::isBetterToPromote(), osl::LANCE, osl::promote(), osl::Piece::ptype(), osl::Ptype_Table, osl::Piece::square(), と osl::Square::y().
void osl::move_generator::PieceOnBoard< Action, notPromoteCapture >::generatePtype | ( | const NumEffectState & | state, | |
Piece | p, | |||
Action & | action, | |||
int | dirMask = 0 | |||
) | [static] |
Generate moves without stating the Ptype as template param.
pinの場合はそれに応じた手を生成する
T | - moveTypeがTの駒 | |
state | - 手を作成する局面,手番はPと一致 | |
p | - 盤面上に存在するPの駒 | |
action | - 手生成用のAction |
pieceOnBoard.tcc の 353 行で定義されています。
参照先 osl::KNIGHT, osl::Piece::number(), osl::NumEffectState::pin(), osl::NumEffectState::pinnedDir(), osl::primDir(), と osl::PieceMask::test().
static void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePtype | ( | const NumEffectState & | state, | |
Piece | p, | |||
Action & | action | |||
) | [inline, static] |
pieceOnBoard.h の 117 行で定義されています。
static void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePtypeUnsafe | ( | const NumEffectState & | state, | |
Piece | p, | |||
Action & | action | |||
) | [inline, static] |
pieceOnBoard.h の 133 行で定義されています。
void osl::move_generator::PieceOnBoard< Action, notPromoteCapture >::generatePtypeUnsafe | ( | const NumEffectState & | state, | |
Piece | p, | |||
Action & | action, | |||
int | dirMask | |||
) | [static] |
Generate moves without stating the Ptype as template param.
pinでないことが判明している時に呼び出す
T | - moveTypeがTの駒 | |
state | - 手を作成する局面,手番はPと一致 | |
p | - 盤面上に存在するPの駒 | |
action | - 手生成用のAction |
pieceOnBoard.tcc の 320 行で定義されています。
参照先 osl::canPromote(), osl::KING, osl::LANCE, osl::PAWN, と osl::Piece::square().