Skip to content

Commit

Permalink
EDIT: add a character representing turn when testing vshogi::Board
Browse files Browse the repository at this point in the history
…class
  • Loading branch information
ctgk committed Oct 7, 2024
1 parent 1d78d5d commit 62e2c37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpp/include/vshogi/common/game.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class Game
for (int ii = n - 4; ii >= 0; ii -= 2) {
const uint index = static_cast<uint>(ii);
num += (m_zobrist_hash == m_hash_list[index]);
if (num > max_acceptable_repetitions)
if (num > max_repetitions_inclusive)
return true;
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/test_vshogi/test_judkins_shogi/test_board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ TEST(judkins_shogi_board, is_destination_attacked)
}
{
// by KE.
const auto b = Board("1n4/6/6/6/6/6");
const auto b = Board("1n4/6/6/6/6/6 b");
CHECK_TRUE(b.is_destination_attacked(vshogi::WHITE, SQ_6C, SQ_1A));
CHECK_FALSE(b.is_destination_attacked(vshogi::WHITE, SQ_5C, SQ_1A));
}
Expand Down Expand Up @@ -172,7 +172,7 @@ TEST(judkins_shogi_board, is_destination_attacked)

TEST(judkins_shogi_board, find_pinned)
{
const auto b = Board("1b3+r/6/3P1P/6/1r1P1K");
const auto b = Board("1b3+r/6/3P1P/6/1r1P1K b");
const auto actual = b.find_pinned(vshogi::BLACK);
const auto expect = bb_3c | bb_1c | bb_3e;
CHECK_EQUAL(expect.value(), actual.value());
Expand Down

0 comments on commit 62e2c37

Please sign in to comment.