Skip to content

Commit

Permalink
方向利きのUnitTestでall_ok &=の代わりにall_ok =になっていたのを修正 (#283)
Browse files Browse the repository at this point in the history
* 方向利きのUnitTestで`all_ok &=`の代わりに`all_ok =`になっていたのを修正

* movegen.cppにも`all_ok &=`の代わりに`all_ok =`と書いているところがあったため修正した
  • Loading branch information
KazApps authored Oct 7, 2024
1 parent 2266fb6 commit de0199c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions source/bitboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,11 +1023,11 @@ void Bitboard::UnitTest(Test::UnitTester& tester)
bool all_ok = true;
Bitboard occ(SQ_77);
Bitboard zero(ZERO);
all_ok = rayEffect<Effect8::DIRECT_LD>(SQ_55, occ) == between_bb(SQ_55, SQ_88);
all_ok = rayEffect<Effect8::DIRECT_LD>(SQ_55, zero) == QUGIY_STEP_EFFECT[Effect8::DIRECT_LD - 2][SQ_55];
all_ok &= rayEffect<Effect8::DIRECT_LD>(SQ_55, occ) == between_bb(SQ_55, SQ_88);
all_ok &= rayEffect<Effect8::DIRECT_LD>(SQ_55, zero) == QUGIY_STEP_EFFECT[Effect8::DIRECT_LD - 2][SQ_55];

Bitboard occ2(SQ_33);
all_ok = rayEffect<Effect8::DIRECT_RU>(SQ_55, occ2) == between_bb(SQ_55, SQ_22);
all_ok &= rayEffect<Effect8::DIRECT_RU>(SQ_55, occ2) == between_bb(SQ_55, SQ_22);

tester.test("rayEffect", all_ok);
}
Expand Down
2 changes: 1 addition & 1 deletion source/movegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bool pseudo_legal_check(const Position& pos, ExtMove* mlist_start, ExtMove* mlis
bool all_ok = true;

for (auto it = mlist_start; it != mlist_end; ++it)
all_ok = pos.pseudo_legal_s<true>(it->move);
all_ok &= pos.pseudo_legal_s<true>(it->move);

// Debug用に、非合法手があった時に局面とその指し手を出力する。
#if 0
Expand Down

0 comments on commit de0199c

Please sign in to comment.