特定のpieceを動かす手を生成 More...
#include <pieceOnBoard.h>
Public Member Functions | |
template<Player P, Ptype T, bool useDirMask> | |
void | generatePtypeUnsafe (const NumEffectState &state, Piece p, Action &action, int dirMask) |
template<Player P, Ptype T, bool useDirMask> | |
void | generatePtype (const NumEffectState &state, Piece p, Action &action, int dirMask) |
template<Player P, bool useDirmask> | |
void | generate (const NumEffectState &state, Piece p, Action &action, int dirMask) |
Static Public Member Functions | |
template<Player P> | |
static void | generatePieceUnsafe (const NumEffectState &state, Piece p, Square target, Piece p1, Action &action) |
駒pがマスtargetに利きをもっているとして,手を生成する. More... | |
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にある駒 More... | |
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. More... | |
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. More... | |
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. More... | |
特定のpieceを動かす手を生成
Definition at line 20 of file pieceOnBoard.h.
|
static |
Generate moves without stating the Ptype as template param.
自玉に王手がかかっていない時に呼ぶ.
state | - 手を作成する局面,手番はPと一致 |
p | - 盤面上に存在するPの駒 |
action | - 手生成用のAction |
void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generate | ( | const NumEffectState & | state, |
Piece | p, | ||
Action & | action, | ||
int | dirMask | ||
) |
Definition at line 373 of file pieceOnBoard.tcc.
References 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, and osl::SILVER.
|
inlinestatic |
Definition at line 53 of file pieceOnBoard.h.
References osl::Board_Table, osl::BoardTable::getShort8Unsafe(), osl::KING, osl::Piece::number(), osl::primDir(), osl::primDirUnsafe(), osl::Piece::ptype(), osl::Piece::square(), and target.
|
inlinestatic |
Definition at line 93 of file pieceOnBoard.h.
References osl::alt(), osl::Board_Table, osl::BoardTable::getShort8Unsafe(), osl::KING, osl::Piece::number(), osl::primDir(), osl::primDirUnsafe(), osl::Piece::square(), and target.
|
inlinestatic |
PtypeがTの駒pがマスtargetに利きをもっているとして,手を生成する. p1 - targetにある駒
Definition at line 74 of file pieceOnBoard.h.
References osl::BISHOP, osl::BLACK, osl::canPromote(), osl::Square::canPromote(), osl::KNIGHT, osl::LANCE, osl::PAWN, osl::promote(), osl::Piece::ptype(), osl::ROOK, osl::Piece::square(), and osl::Square::y().
|
inlinestatic |
駒pがマスtargetに利きをもっているとして,手を生成する.
Definition at line 26 of file pieceOnBoard.h.
References osl::BLACK, osl::PtypeTable::canDropTo(), osl::canPromote(), osl::Square::canPromote(), osl::PtypeTable::isBetterToPromote(), osl::LANCE, osl::PAWN, osl::promote(), osl::Piece::ptype(), osl::Ptype_Table, osl::Piece::square(), and osl::Square::y().
|
static |
Generate moves without stating the Ptype as template param.
pinの場合はそれに応じた手を生成する
T | - moveTypeがTの駒 |
state | - 手を作成する局面,手番はPと一致 |
p | - 盤面上に存在するPの駒 |
action | - 手生成用のAction |
|
inlinestatic |
Definition at line 118 of file pieceOnBoard.h.
void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePtype | ( | const NumEffectState & | state, |
Piece | p, | ||
Action & | action, | ||
int | dirMask | ||
) |
Definition at line 355 of file pieceOnBoard.tcc.
References osl::KNIGHT, osl::Piece::number(), and osl::primDir().
|
static |
Generate moves without stating the Ptype as template param.
pinでないことが判明している時に呼び出す
T | - moveTypeがTの駒 |
state | - 手を作成する局面,手番はPと一致 |
p | - 盤面上に存在するPの駒 |
action | - 手生成用のAction |
|
inlinestatic |
Definition at line 134 of file pieceOnBoard.h.
void osl::move_generator::PieceOnBoard< Action, noCapturePromote >::generatePtypeUnsafe | ( | const NumEffectState & | state, |
Piece | p, | ||
Action & | action, | ||
int | dirMask | ||
) |
Definition at line 322 of file pieceOnBoard.tcc.
References osl::canPromote(), osl::move_generator::piece_on_board::generateKing(), osl::move_generator::piece_on_board::generateLance(), osl::move_generator::piece_on_board::generatePawn(), osl::move_generator::piece_on_board::generatePtypePromote(), osl::KING, osl::LANCE, osl::PAWN, and osl::Piece::square().