add debug macro
This commit is contained in:
parent
930ba9b408
commit
5b6e877a51
1 changed files with 16 additions and 0 deletions
|
@ -1163,6 +1163,22 @@ namespace Hanabi
|
|||
unsigned long id, Hanabi::probability_t probability
|
||||
)
|
||||
{
|
||||
// This macro can be activated if we want to dump details on all game states visited for analysis purposes.
|
||||
#ifdef DUMP_STATES
|
||||
std::cout << *this << std::endl;
|
||||
const auto [id_parts, cards] = dump_unique_id_parts();
|
||||
std::cout << "id is: " << id << ", id parts are: ";
|
||||
for (auto const & part: id_parts) {
|
||||
std::cout << part << " ";
|
||||
}
|
||||
std::cout << ", encoded cards are ";
|
||||
for (auto const & part: cards) {
|
||||
std::cout << part << " ";
|
||||
}
|
||||
std::cout << ", probability is ";
|
||||
print_probability(std::cout, probability);
|
||||
std::cout << "\n" << std::endl;
|
||||
#endif
|
||||
if (_position_tablebase.contains(id))
|
||||
{
|
||||
ASSERT(_position_tablebase[id] == probability);
|
||||
|
|
Loading…
Reference in a new issue