fix output operator for stack

This commit is contained in:
Maximilian Keßler 2023-08-07 10:45:11 +02:00
parent 2735e66ade
commit 704913b64c
Signed by: max
GPG key ID: BCC5A619923C0BA5
2 changed files with 6 additions and 6 deletions

View file

@ -73,10 +73,10 @@ constexpr Card y4 = {1, 4};
* - Number of clues
*/
template <suit_t num_suits>
template <size_t num_suits>
using Stacks = std::array<rank_t, num_suits>;
template <suit_t num_suits>
template <size_t num_suits>
std::ostream& operator<<(std::ostream &os, const Stacks<num_suits> &stacks);
struct CardMultiplicity {

View file

@ -27,7 +27,7 @@ namespace Hanabi {
return os;
}
template<suit_t num_suits>
template<size_t num_suits>
std::ostream& operator<<(std::ostream &os, const Stacks<num_suits> &stacks) {
for (size_t i = 0; i < stacks.size() - 1; i++) {
os << starting_card_rank - stacks[i] << ", ";
@ -189,7 +189,7 @@ namespace Hanabi {
template<suit_t num_suits, player_t num_players, hand_index_t hand_size>
void HanabiState<num_suits, num_players, hand_size>::print(std::ostream &os) const {
// os << "Stacks: " << _stacks << " (score " << +_score << ")";
os << "Stacks: " << _stacks << " (score " << +_score << ")";
os << ", clues: " << +_num_clues << ", turn: " << +_turn << std::endl;
os << "Draw pile: ";
for (const auto &[card, mul]: _draw_pile) {