Do not prefer to move to good point when skill level is 1

This commit is contained in:
Calcitem 2021-07-20 01:53:07 +08:00
parent 704dd0ac53
commit 3729162862
No known key found for this signature in database
GPG Key ID: F2F7C29E054CFB80
1 changed files with 13 additions and 0 deletions

View File

@ -374,6 +374,19 @@ void mill_table_init()
void move_priority_list_shuffle()
{
if (gameOptions.getSkillLevel() == 1) {
for (auto i = 8; i < 32; i++) { // TODO: SQ_BEGIN & SQ_END
MoveList<LEGAL>::movePriorityList[i - int(SQ_BEGIN)] = (Square)i;
}
if (gameOptions.getShufflingEnabled()) {
const uint32_t seed = static_cast<uint32_t>(now());
std::shuffle(MoveList<LEGAL>::movePriorityList.begin(), MoveList<LEGAL>::movePriorityList.end(),
std::default_random_engine(seed));
}
return;
}
std::array<Square, 4> movePriorityList0;
std::array<Square, 8> movePriorityList1;
std::array<Square, 4> movePriorityList2;