std::string _info()

in simple_game/simple_hanabi.h [280:313]


  std::string _info(bool partial) const {
    if (allCards_.empty()) {
      return "s";
    }

    // Current status
    std::string s;

    for (int i = 0; i < options_.numPlayer; ++i) {
      // Skip the current player (who cannot see the card).
      s += "p" + std::to_string(i + 1) + ":";

      bool selfcard = (partial && i == currPlayer_ - 1);
      for (int j = 0; j < options_.numHold; ++j) {
        s += hands_[i][j].info(selfcard);
        s += ",";
      }
    }
    // All public actions + current status.
    s += "||";
    for (const auto& pubAct : publicActions_) {
      s += pubAct + "-";
    }
    // Finally the current top
    s += "||";
    for (size_t suit = 0; suit < currTops_.size(); ++suit) {
      s += "s" + std::to_string(suit) + "t" + std::to_string(currTops_[suit]) +
           ",";
    }

    s += "hints" + std::to_string(hints_) + ",lives" + std::to_string(lives_) +
         ",used" + std::to_string(cardUsed_);
    return s;
  }