Pの王をopen checkにする手でないことをチェック. [詳細]
#include <kingOpenMove.h>
Static Public メソッド | |
static bool | isMember (const NumEffectState &state, Ptype, Position from, Position to) |
king が59 rookが51->61の時,差は OFFSET -8 -> U OFFSET +8 -> D とはなるので,一直線のような気がする.ただし,そもとも, 59 - 51はpinにはならないし,今は U -> DはopenではないとしているのでOK | |
static bool | isMember (const NumEffectState &state, Ptype ptype, Position from, Position to, Position exceptFor) |
Static Private メソッド | |
template<bool hasException> | |
static bool | isMemberMain (const NumEffectState &state, Ptype ptype, Position from, Position to, Position exceptFor) |
Pの王をopen checkにする手でないことをチェック.
kingOpenMove.h の 23 行で定義されています。
static bool osl::move_classifier::KingOpenMove< P >::isMember | ( | const NumEffectState & | state, | |
Ptype | ptype, | |||
Position | from, | |||
Position | to, | |||
Position | exceptFor | |||
) | [inline, static] |
exceptFor | ここからの利きは除外 |
kingOpenMove.h の 47 行で定義されています。
static bool osl::move_classifier::KingOpenMove< P >::isMember | ( | const NumEffectState & | state, | |
Ptype | , | |||
Position | from, | |||
Position | to | |||
) | [inline, static] |
king が59 rookが51->61の時,差は OFFSET -8 -> U OFFSET +8 -> D とはなるので,一直線のような気がする.ただし,そもとも, 59 - 51はpinにはならないし,今は U -> DはopenではないとしているのでOK
kingOpenMove.h の 33 行で定義されています。
参照先 osl::Board_Table, osl::BoardTable::getShort8(), osl::BoardTable::getShort8Unsafe(), と osl::Piece::isPieceNum().
template bool osl::move_classifier::KingOpenMove< P >::isMemberMain< false > | ( | const NumEffectState & | state, | |
Ptype | ptype, | |||
Position | from, | |||
Position | to, | |||
Position | exceptFor | |||
) | [inline, static, private] |
守っている玉が動く状況では呼ばない
openになってしまうかどうかのチェック
移動元が王の8方向でないか openにならない
そのptypeoがそのoffsetを動きとして持つか 注: 持つ => safe でない => false を返す
kingOpenMove.cc の 7 行で定義されています。
参照先 osl::Board_Table, osl::PtypeTable::getEffect(), osl::BoardTable::getShortOffsetNotKnight(), osl::move_generator::addeffect8::hasEffect(), osl::Piece::isEmpty(), osl::Position::isOnBoard(), osl::Piece::isOnBoardByOwner(), osl::Position::isPieceStand(), osl::Ptype_Table, osl::Piece::ptypeO(), と osl::Offset::zero().