17 #if (defined(__i386__) || defined(__x86_64__)) && !defined(OSL_NO_SSE) 18 #include <emmintrin.h> 39 return (static_cast<const SimpleState&>(st1)
49 template<osl::Player P>
53 #ifdef ALLOW_KING_ABSENCE 54 if (kingSquare<P>().isPieceStand())
57 king8infos[P]=King8Info::make<altP>(*
this,kingSquare<P>()).uint64Value();
71 for(
int num=0;num<40;num++){
90 makeKing8Info<BLACK>();
91 if(kingSquare<WHITE>().isOnBoard())
92 makeKing8Info<WHITE>();
129 pieces = effect.
getMask(index) & ~ppieces;
130 if (pieces.none() || ppieces.none())
131 return pieceOf(pieces.any() ? pieces.bsf() : ppieces.bsf());
132 const int num = pieces.bsf(), nump = ppieces.bsf();
144 int pp=-1, npp=-1, ret=-1;
146 for (
int i=lance_index; i>=0; --i) {
149 mask_t notpromoted = all & ~promoted;
150 if (promoted.any()) {
151 pp = promoted.bsr() + i*32;
154 if (notpromoted.any())
155 npp = notpromoted.bsr() + i*32;
164 return pieceOf(plance.bsr()+lance_index*32);
165 return pieceOf(lance.bsr()+lance_index*32);
179 const Square from = last_move.
from(), to = last_move.
to();
246 oldPiece, num, oldPtypeO, newPtypeO,
247 pin_or_open_backup, king_mobility_backup,
248 promoted_backup, effected_mask_backup, effected_changed_mask_backup,king8infos_backup,mobilityTable);
252 oldPiece, num, oldPtypeO, newPtypeO,
253 pin_or_open_backup, king_mobility_backup,
254 promoted_backup, effected_mask_backup, effected_changed_mask_backup,king8infos_backup,mobilityTable);
264 int num0, num1, num1Index;
275 capturePtypeO, newPtypeO, num0, num1, num1Index,num1Mask,
276 pin_or_open_backup, king_mobility_backup,
277 promoted_backup, effected_mask_backup, effected_changed_mask_backup,king8infos_backup,mobilityTable);
281 capturePtypeO, newPtypeO, num0, num1, num1Index,num1Mask,
282 pin_or_open_backup, king_mobility_backup,
283 promoted_backup, effected_mask_backup, effected_changed_mask_backup,king8infos_backup,mobilityTable);
286 if (capturePtype==
PAWN)
307 pin_or_open_backup, king_mobility_backup,
308 effected_mask_backup, effected_changed_mask_backup,king8infos_backup,mobilityTable);
312 pin_or_open_backup, king_mobility_backup,
313 effected_mask_backup, effected_changed_mask_backup,king8infos_backup,mobilityTable);
319 template<osl::Player P>
322 Piece& oldPiece,
int& num,
344 oldPtypeO=oldPiece.
ptypeO();
345 new_ptypeo=newPiece.
ptypeO();
350 effects.template doEffect<NumBitmapEffect::Sub,true>(*
this,oldPtypeO,from,num);
355 effects.template doBlockAt<NumBitmapEffect::Sub,true>(*
this,to,num);
357 effects.template doBlockAt<NumBitmapEffect::Add,true>(*
this,from,num);
358 effects.template doEffect<NumBitmapEffect::Add,true>(*
this,new_ptypeo,to,num);
393 makeKing8Info<BLACK>();
396 makeKing8Info<WHITE>();
429 template<osl::Player P>
433 int& numIndex,
mask_t& numMask,
447 #if OSL_WORDSIZE == 64 449 #elif OSL_WORDSIZE == 32 452 const mask_t ownMochigoma=
454 assert(ownMochigoma.any());
455 numMask=ownMochigoma.lowestBit();
456 int numLow = ownMochigoma.bsf();
457 num = numLow|(numIndex<<5);
459 Piece newPiece=oldPiece;
465 effects.template doBlockAt<NumBitmapEffect::Sub,true>(*
this,to,num);
466 effects.template doEffect<NumBitmapEffect::Add,true>(*
this,ptypeO,to,num);
494 makeKing8Info<BLACK>();
497 makeKing8Info<WHITE>();
501 template<osl::Player P>
516 effects.template doEffect<NumBitmapEffect::Sub,false>(*
this,ptypeO,to,num);
517 effects.template doBlockAt<NumBitmapEffect::Add,false>(*
this,to,num);
529 template<osl::Player P>
534 PtypeO& new_ptypeo,
int& num0,
int& num1,
535 int& num1Index,
mask_t& num1Mask,
563 oldPtypeO=oldPiece.
ptypeO();
564 new_ptypeo=newPiece.
ptypeO();
565 capturePtypeO=target.
ptypeO();
570 effects.template doEffect<NumBitmapEffect::Sub,true>(*
this,capturePtypeO,to,num1);
571 effects.template doEffect<NumBitmapEffect::Sub,true>(*
this,oldPtypeO,from,num0);
573 effects.template doBlockAt<NumBitmapEffect::Add,true>(*
this,from,num0);
577 effects.template doEffect<NumBitmapEffect::Add,true>(*
this,new_ptypeo,to,num0);
617 makeKing8Info<BLACK>();
620 makeKing8Info<WHITE>();
624 template<osl::Player P>
629 int num1Index,
mask_t num1Mask,
645 effects.template doEffect<NumBitmapEffect::Sub,false>(*
this,
newPtypeO,to,num0);
648 effects.template doBlockAt<NumBitmapEffect::Sub,false>(*
this,from,num0);
649 effects.template doEffect<NumBitmapEffect::Add,false>(*
this,capturePtypeO,to,num1);
650 effects.template doEffect<NumBitmapEffect::Add,false>(*
this,oldPtypeO,from,num0);
668 std::cerr <<
"error before effect\n";
676 std::cerr <<
"Effect error 1" << std::endl;
678 for(
int y=1;y<=9;y++)
687 for(
int num=0;num<=39;num++){
688 for(
int i=0;i<8;i++){
699 for (
int z=0; z<2; ++z) {
701 #ifdef ALLOW_KING_ABSENCE 706 const PieceMask pin2 = effect_util::Pin::make(*
this, p);
707 if (
pin(p) != pin2) {
709 std::cerr <<
"pin for " << p <<
" differs " <<
pin(p) <<
" " << pin2 <<
"\n";
716 std::cerr <<
"king8info for " << p <<
" differs \n" <<
King8Info(
Iking8Info(p)) <<
"\n" << king8info2 <<
"\n";
742 each_effect[i].clear();
743 prev_effect[i].clear();
745 for (
int x=1; x<=9; ++x) {
746 for (
int y=1; y<=9; ++y) {
750 each_effect[i].set(sq);
752 prev_effect[i].
set(sq);
754 if (! changed_all.
test(sq))
759 std::cerr <<
"changedEffects unset\n" << *
this << moved << sq <<
"\n";
764 for (
int i=0; i<2; ++i)
767 if (! changed_squares[pl].test(sq))
773 std::cerr <<
"changedEffects unset for " << pl <<
"\n" << *
this << moved << sq <<
"\n";
784 if (each_effect[i] == prev_effect[i])
786 if (! changed_effect_pieces.
test(i)) {
789 std::cerr <<
"changedPieces() unset\n" << *
this << moved << i
790 <<
" " << each_effect[i] <<
" != " << prev_effect[i] <<
"\n";
798 for (
int j=0; j<2; ++j)
807 std::cerr <<
"effectedChanged(" << pl <<
") unset\n" << *
this << moved << i
818 template <
bool show_error>
820 #if (defined __GNUC__) && (! defined GPSONE) && (! defined GPSUSIONE) 831 return isAlmostValidDrop<show_error>(move);
835 if (! testValidityOtherThanEffect<show_error>(move))
839 std::cerr <<
" No such move2 : " << move << std::endl;
852 return isAlmostValidMove<true>(move);
854 return isAlmostValidMove<false>(move);
860 os<< static_cast<SimpleState const&>(*this);
861 for(
int y=1;y<=9;y++){
863 for(
int x=9;x>0;x--){
889 makePinOpenDir<UL>(target,pins,mask,defense);
890 makePinOpenDir<U>(target,pins,mask,defense);
891 makePinOpenDir<UR>(target,pins,mask,defense);
892 makePinOpenDir<L>(target,pins,mask,defense);
893 makePinOpenDir<R>(target,pins,mask,defense);
894 makePinOpenDir<DL>(target,pins,mask,defense);
895 makePinOpenDir<D>(target,pins,mask,defense);
896 makePinOpenDir<DR>(target,pins,mask,defense);
911 return allEffectAt<PAWN>(attack, target);
913 return allEffectAt<LANCE>(attack, target);
915 return allEffectAt<KNIGHT>(attack, target);
917 return allEffectAt<SILVER>(attack, target);
919 return allEffectAt<GOLD>(attack, target);
921 return allEffectAt<BISHOP>(attack, target);
923 return allEffectAt<ROOK>(attack, target);
925 return allEffectAt<KING>(attack, target);
938 #if (defined(__i386__) || defined(__x86_64__)) && !defined(OSL_NO_SSE) 940 v2di b16=*((v2di*)&src.
board[16]);
941 v2di b20=*((v2di*)&src.
board[20]);
942 v2di b24=*((v2di*)&src.
board[24]);
943 v2di b32=*((v2di*)&src.
board[32]);
944 v2di b36=*((v2di*)&src.
board[36]);
945 v2di b40=*((v2di*)&src.
board[40]);
946 v2di b48=*((v2di*)&src.
board[48]);
947 v2di b52=*((v2di*)&src.
board[52]);
948 v2di b56=*((v2di*)&src.
board[56]);
950 *((v2di*)&(*this).board[16])=b16;
951 *((v2di*)&(*this).board[20])=b20;
952 *((v2di*)&(*this).board[24])=b24;
953 *((v2di*)&(*this).board[32])=b32;
954 *((v2di*)&(*this).board[36])=b36;
955 *((v2di*)&(*this).board[40])=b40;
956 *((v2di*)&(*this).board[48])=b48;
957 *((v2di*)&(*this).board[52])=b52;
958 *((v2di*)&(*this).board[56])=b56;
961 v2di b64=*((v2di*)&src.
board[64]);
962 v2di b68=*((v2di*)&src.
board[68]);
963 v2di b72=*((v2di*)&src.
board[72]);
965 v2di b80=*((v2di*)&src.
board[80]);
966 v2di b84=*((v2di*)&src.
board[84]);
967 v2di b88=*((v2di*)&src.
board[88]);
969 v2di b96=*((v2di*)&src.
board[96]);
970 v2di b100=*((v2di*)&src.
board[100]);
971 v2di b104=*((v2di*)&src.
board[104]);
974 *((v2di*)&(*this).board[64])=b64;
975 *((v2di*)&(*this).board[68])=b68;
976 *((v2di*)&(*this).board[72])=b72;
978 *((v2di*)&(*this).board[80])=b80;
979 *((v2di*)&(*this).board[84])=b84;
980 *((v2di*)&(*this).board[88])=b88;
982 *((v2di*)&(*this).board[96])=b96;
983 *((v2di*)&(*this).board[100])=b100;
984 *((v2di*)&(*this).board[104])=b104;
986 v2di b112=*((v2di*)&src.
board[112]);
987 v2di b116=*((v2di*)&src.
board[116]);
988 v2di b120=*((v2di*)&src.
board[120]);
990 v2di b128=*((v2di*)&src.
board[128]);
991 v2di b132=*((v2di*)&src.
board[132]);
992 v2di b136=*((v2di*)&src.
board[136]);
994 v2di b144=*((v2di*)&src.
board[144]);
995 v2di b148=*((v2di*)&src.
board[148]);
996 v2di b152=*((v2di*)&src.
board[152]);
998 *((v2di*)&(*this).board[112])=b112;
999 *((v2di*)&(*this).board[116])=b116;
1000 *((v2di*)&(*this).board[120])=b120;
1002 *((v2di*)&(*this).board[128])=b128;
1003 *((v2di*)&(*this).board[132])=b132;
1004 *((v2di*)&(*this).board[136])=b136;
1006 *((v2di*)&(*this).board[144])=b144;
1007 *((v2di*)&(*this).board[148])=b148;
1008 *((v2di*)&(*this).board[152])=b152;
1010 v2di p0=*((v2di*)&src.
pieces[0]);
1011 v2di p4=*((v2di*)&src.
pieces[4]);
1012 v2di p8=*((v2di*)&src.
pieces[8]);
1013 v2di p12=*((v2di*)&src.
pieces[12]);
1014 v2di p16=*((v2di*)&src.
pieces[16]);
1015 v2di p20=*((v2di*)&src.
pieces[20]);
1016 v2di p24=*((v2di*)&src.
pieces[24]);
1017 v2di p28=*((v2di*)&src.
pieces[28]);
1018 v2di p32=*((v2di*)&src.
pieces[32]);
1019 v2di p36=*((v2di*)&src.
pieces[36]);
1020 *((v2di*)&(*this).pieces[0])=p0;
1021 *((v2di*)&(*this).pieces[4])=p4;
1022 *((v2di*)&(*this).pieces[8])=p8;
1023 *((v2di*)&(*this).pieces[12])=p12;
1024 *((v2di*)&(*this).pieces[16])=p16;
1025 *((v2di*)&(*this).pieces[20])=p20;
1026 *((v2di*)&(*this).pieces[24])=p24;
1027 *((v2di*)&(*this).pieces[28])=p28;
1028 *((v2di*)&(*this).pieces[32])=p32;
1029 *((v2di*)&(*this).pieces[36])=p36;
1032 for(
int x=1;x<=9;x++)
1033 for(
int y=1;y<=9;y++)
1035 (*this).pieces=src.
pieces;
1055 using namespace move_classifier;
1056 return ConditionAdaptor<SafeMove>::isMember(*
this, move);
1060 using namespace move_classifier;
1061 return PlayerMoveAdaptor<Check>::isMember(*
this, move);
1065 using namespace move_classifier;
1066 return PlayerMoveAdaptor<PawnDropCheckmate>::isMember(*
this, move);
1070 using namespace move_classifier;
1071 return PlayerMoveAdaptor<DirectCheck>::isMember(*
this, move);
1076 using namespace move_classifier;
1077 return ConditionAdaptor<OpenCheck>::isMember(*
this, move);
1098 std::copy_if(all_moves.
begin(), all_moves.
end(), std::back_inserter(moves),
1110 for (
int i=0, iend=moves.
size(); i<iend; ++i) {
1111 const Move move = moves[i];
1129 template bool NumEffectState::
1130 hasEffectByWithRemove<BLACK>(
Square, Square)
const;
1131 template bool NumEffectState::
1132 hasEffectByWithRemove<WHITE>(Square, Square)
const;
1133 template void NumEffectState::makeKing8Info<BLACK>();
1134 template void NumEffectState::makeKing8Info<WHITE>();
1195 NumEffectState::safeCaptureNotByKing<BLACK>(Square,
Piece)
const;
1197 NumEffectState::safeCaptureNotByKing<WHITE>(Square,
Piece)
const;
constexpr Direction primDirUnsafe(Direction d)
8方向について,primitiveな4方向を求める dとしてknight, INVALIDなども来る
void clearPawn(Player pl, Square sq)
(internal)
Ptype unpromote(Ptype ptype)
ptypeがpromote後の型の時に,promote前の型を返す. promoteしていない型の時はそのまま返す ...
void push_back(const T &e)
void doBlockAt(const SimpleState &state, Square pos, int piece_num)
posに駒を設置/削除して長い利きをブロック/延長する際の利きデータの更新.
int max(Player p, int v1, int v2)
CArray< BitXmask, 2 > pawnMask
bool hasEffectIf(PtypeO ptypeo, Square attacker, Square target) const
attackerにptypeoの駒がいると仮定した場合にtargetに利きがあるかどうか を stateをupdateしないで確かめる...
mobility::MobilityTable mobilityTable
mobility
static void generate(const NumEffectState &state, MoveVector &out)
不成の受けも作成
GeneralMask< mask_int_t > mask_t
bool hasEffectAt(Square target) const
対象とするマスにあるプレイヤーの利きがあるかどうか.
void doDropMove(Square to, Ptype ptype)
constexpr Player alt(Player player)
void prologueDrop(Player2Type< P >, Square to, Ptype ptype, Piece &oldPiece, int &num, PtypeO &ptypeO, int &numIndex, mask_t &numMask, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
const PtypeO PTYPEO_EDGE __attribute__((unused))
void doSimpleMove(Square from, Square to, int promoteMask)
void recalcPinOpen(Square changed, Direction &lastDir, Player defense)
KingMobility king_mobility
void doEffect(const SimpleState &state, PtypeO ptypeo, Square pos, int num)
ある種類の駒が持つ利きを更新する.
int min(Player p, int v1, int v2)
bool hasIgnoredUnpromote() const
MoveをunpromoteするとcutUnpromoteなMoveになる
const PieceMask pin(Player king) const
PtypeO capturePtypeO() const
Ptype getPtype(PtypeO ptypeO)
void generateLegal(MoveVector &) const
全ての合法手を生成する.
const Move unpromote() const
promote moveからunpromote moveを作る
const NumBitmapEffect changedPieces() const
effect::NumSimpleEffectTable effects
Direction pinnedDir(Piece p) const
pinされた駒がPのKingから見てどの方向か? Pから見たdirectionを返す
const Piece pieceAt(Square sq) const
bool isNormal() const
INVALID でも PASS でもない.
bool wasCheckEvasion(Move last_move) const
bool isBetweenSafe(Square t, Square p0, Square p1) const
const Piece pieceOnBoard(Square sq) const
bool isOpenCheck(Move move) const
static const Piece EMPTY()
void clearEffectedChanged()
bool isConsistent(bool show_error=true) const
void clearBit()
unpromote(PTYPE) の駒のbit を消す
void showEffect(std::ostream &os) const
bool hasEffectByPiece(Piece attack, Square target) const
駒attack が target に利きを持つか (旧hasEffectToと統合)
CArray< PieceMask, 2 > effected_mask
CArray< PieceMask, 2 > pieces_onboard
bool test(unsigned int i) const
void generateWithFullUnpromotions(MoveVector &) const
打歩詰め絡み以外では有利にはならない手も含め, 全ての合法手を生成す る(Move::ignoredUnpromoteも生成す...
const NumBitmapEffect effectSetAt(Square pos) const
ある位置の利きデータを取り出す.
void invalidateChangedEffects()
PtypeO newPtypeO(Player player, Ptype ptype)
bool isConsistent(bool showError=true) const
PieceMask & standMask(Player p)
void prologueSimple(Player2Type< P >, Square from, Square to, int promoteMask, Piece &oldPiece, int &num, PtypeO &oldPtypeO, PtypeO &new_ptypeo, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, PieceMask &promoted_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
const Piece pieceOf(int num) const
Square kingSquare() const
bool isPawnDropCheckmate(Move move) const
const PtypeTable Ptype_Table
bool isSafeMove(Move move) const
void copyFrom(const NumEffectState &src)
主要部分を高速にコピーする.
bool isDirectCheck(Move move) const
const Square from() const
const BoardMask changedEffects() const
Ptype oldPtype() const
移動前のPtype, i.e., 成る手だった場合成る前
static void generate(Player p, const NumEffectState &state, MoveVector &)
const PieceMask effectedChanged(Player pl) const
前の指手でeffectedMask(pl)が変化したか.
const NumBitmapEffect effectSetAt(Square sq) const
CArray< PieceMask, 2 > stand_mask
bool isPromoted() const
promoteした駒かどうかをチェックする
const Piece promoteWithMask(int promote_mask) const
bool isOnBoard(int num) const
const Piece selectCheapPiece(PieceMask effect) const
利きの中から安そうな駒を選ぶ
const BoardMaskTable3x3 Board_Mask_Table3x3
CArray< uint64_t, 2 > king8infos
const PieceTable Piece_Table
unsigned int index() const
int promoteMask() const
pieceに使うためのmaskなので
constexpr Direction primDir(Direction d)
8方向について,primitiveな4方向を求める
bool isAlmostValidMove(Move move) const
合法手かどうかを簡単に検査する.局面に依存するチェックのみ. ルール上指せない手である可能性がある場合...
mask_t getMaskLow(Ptype ptype) const
void setPieceOf(int num, Piece p)
const checkmate::King8Info king8Info(Player king) const
uint64_t Iking8Info(Player king) const
void findEffect(Player P, Square target, PieceVector &out) const
target に利きのあるPieceをoutに格納する
static const mask_t numToMask(int num)
const Square square() const
void doCaptureMove(Square from, Square to, Piece target, int promoteMask)
constexpr Player indexToPlayer(int n)
PtypeO
Player + Ptype [-15, 15] PtypeO の O は Owner の O.
CArray< PieceMask, 2 > effected_changed_mask
int getIndex(Ptype) const
void setChangedPieces(NumBitmapEffect const &effect)
static int numToIndex(int)
void generateAllUnsafe(MoveVector &) const
自殺を含めてすべての手を生成
static const King8Info make(NumEffectState const &state, Square king, PieceMask pinned)
const std::string show(Move)
const PieceMask & piecesOnBoard(Player p) const
uint64_t uint64Value() const
const mask_t allEffectAt(Player P, Square target) const
void setBoard(Square sq, Piece piece)
bool isCheck(Move move) const
Ptype getPtypeOf(int num) const
void copyFrom(const NumSimpleEffectTable &src)
主要部分を高速にコピーする.
void epilogueDrop(Player2Type< P >, Square to, Ptype ptype, Piece oldPiece, int num, PtypeO ptypeO, int numIndex, mask_t numMask, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)
void prologueCapture(Player2Type< P >, Square from, Square to, Piece target, int promoteMask, Piece &oldPiece, PtypeO &oldPtypeO, PtypeO &capturePtypeO, PtypeO &new_ptypeo, int &num0, int &num1, int &num1Index, mask_t &num1Mask, CArray< PieceMask, 2 > &pin_or_open_backup, KingMobility &king_mobility_backup, PieceMask &promoted_backup, CArray< PieceMask, 2 > &effected_mask_backup, CArray< PieceMask, 2 > &effected_changed_mask_backup, CArray< uint64_t, 2 > &king8infos_backup, MobilityTable &mobility_backup)
void setPawn(Player pl, Square sq)
(internal)
const PieceMask effectedMask(Player pl) const
pl からの利きが(1つ以上)ある駒一覧
bool anyInRange(const BoardMask &mask) const
static void generate(const NumEffectState &state, Action &action)
PtypeO captured(PtypeO ptypeO)
unpromoteすると共に,ownerを反転する.
const mask_t getMask(int num) const
static bool isValidMoveByRule(Move move, bool show_error)
盤面以外の部分の反則のチェック
EffectedNumTable effectedNumTable
effected num
bool inCheck() const
手番の玉が王手状態
CArray< CArray< char, PTYPE_SIZE-PTYPE_BASIC_MIN >, 2 > stand_count
CArray< Piece, Piece::SIZE > pieces
全てのpieceが登録されている
bool operator==(Square l, Square r)
Direction getShort8Unsafe(Square from, Square to) const
8方向にいない場合も適当なものを返す.
const Piece findThreatenedPiece(Player P) const
取られそうなPの駒で価値が最大のもの
CArray< Piece, Square::SIZE > board
NumEffectState(const SimpleState &st=SimpleState(HIRATE))
void xorMask(int index, mask_t val)
const mask_t selectBit() const
unpromote(PTYPE) の駒のbit だけ取り出す
PieceMask makePinOpen(Square target, Player defense)
bool isPieceStand() const
void clearChangedEffects()
const PieceMask promotedPieces() const
CArray< PieceMask, 2 > pin_or_open
static const Square STAND()
const Piece captured() const
取られたpieceを作成.
const BoardTable Board_Table
void epilogueCapture(Player2Type< P >, Square from, Square to, Piece target, Piece oldPiece, PtypeO oldPtypeO, PtypeO capturePtypeO, PtypeO newPtypeO, int num0, int num1, int num1Index, mask_t num1Mask, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const PieceMask &promoted_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)
void forEachEffect(const PieceMask &pieces, Square sq, Action &action) const
const BoardMask & mask(Square p) const
p中心の3x3 の範囲のbitを立てたもの, centeringなし
void epilogueSimple(Square from, Square to, Piece oldPiece, int num, PtypeO oldPtypeO, PtypeO newPtypeO, const CArray< PieceMask, 2 > &pin_or_open_backup, const KingMobility &king_mobility_backup, const PieceMask &promoted_backup, const CArray< PieceMask, 2 > &effected_mask_backup, const CArray< PieceMask, 2 > &effected_changed_mask_backup, const CArray< uint64_t, 2 > &king8infos_backup, const MobilityTable &mobility_backup)