| 120 | |
| 121 | |
| 122 | std::string RankToDiagrams( |
| 123 | const unsigned short ranks[DDS_HANDS][DDS_SUITS], |
| 124 | const NodeCards& node) |
| 125 | { |
| 126 | std::stringstream ss; |
| 127 | for (int s = 0; s < DDS_SUITS; s++) |
| 128 | { |
| 129 | ss << std::setw(12) << std::left << |
| 130 | (s == 0 ? "Sought" : "") << |
| 131 | card_suit[s] << " " << std::setw(20) << PrintSuit(ranks[0][s]) << "| " << |
| 132 | std::setw(12) << (s == 0 ? "Found" : "") << |
| 133 | card_suit[s] << " " << |
| 134 | PrintSuit(ranks[0][s], node.least_win[s]) << "\n"; |
| 135 | } |
| 136 | |
| 137 | for (int s = 0; s < DDS_SUITS; s++) |
| 138 | { |
| 139 | ss << |
| 140 | card_suit[s] << " " << std::setw(22) << std::left << PrintSuit(ranks[3][s]) << |
| 141 | card_suit[s] << " " << std::setw(8) << PrintSuit(ranks[1][s]) << "| " << |
| 142 | card_suit[s] << " " << |
| 143 | std::setw(22) << PrintSuit(ranks[3][s], node.least_win[s]) << |
| 144 | card_suit[s] << " " << |
| 145 | PrintSuit(ranks[1][s], node.least_win[s]) << "\n"; |
| 146 | } |
| 147 | |
| 148 | for (int s = 0; s < DDS_SUITS; s++) |
| 149 | { |
| 150 | ss << std::setw(12) << std::left << "" << |
| 151 | card_suit[s] << " " << std::setw(20) << PrintSuit(ranks[0][s]) << "| " << |
| 152 | std::setw(12) << "" << card_suit[s] << " " << |
| 153 | PrintSuit(ranks[0][s], node.least_win[s]) << "\n"; |
| 154 | } |
| 155 | return ss.str(); |
| 156 | } |
| 157 | |
| 158 | |
| 159 | std::string WinnersToText(const unsigned short ourWinRanks[]) |
nothing calls this directly
no test coverage detected