change some types

This commit is contained in:
Maximilian Keßler 2023-08-12 19:55:10 +02:00
parent 38e99cf662
commit 849c0a6538
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -129,7 +129,7 @@ struct CardMultiplicity {
Card card; Card card;
unsigned multiplicity; unsigned multiplicity;
auto operator<=>(const CardMultiplicity &) const = default; bool operator==(const CardMultiplicity &) const = default;
}; };
template<typename T> template<typename T>
@ -163,7 +163,7 @@ private:
std::array<inner_array_t , num_suits> _array {}; std::array<inner_array_t , num_suits> _array {};
}; };
enum class ActionType { enum class ActionType : std::uint8_t {
play = 0, play = 0,
discard = 1, discard = 1,
clue = 2, clue = 2,
@ -302,15 +302,15 @@ private:
// Card positions of these cards. Indexes correspond to the cards stored in _good_cards_draw vector // Card positions of these cards. Indexes correspond to the cards stored in _good_cards_draw vector
boost::container::static_vector<boost::container::static_vector<player_t, max_card_duplicity>, 30> card_positions_draw; boost::container::static_vector<boost::container::static_vector<player_t, max_card_duplicity>, 30> card_positions_draw;
// Note this is not the same as _good_cards_draw.size(), since this accounts for multiplicities
size_t initial_draw_pile_size {};
// This will indicate whether cards that were in hands initially still are in hand // This will indicate whether cards that were in hands initially still are in hand
// The first n bits are used and cards are assumed to have been marked with their indices in this bitset // The first n bits are used and cards are assumed to have been marked with their indices in this bitset
std::bitset<num_players * hand_size> card_positions_hands {}; std::bitset<num_players * hand_size> card_positions_hands {};
// Note this is not the same as _good_cards_draw.size(), since this accounts for multiplicities
std::uint8_t initial_draw_pile_size { 0 };
// Number of bits from above bitset that is meaningful // Number of bits from above bitset that is meaningful
size_t num_useful_cards_in_starting_hands { 0 }; std::uint8_t num_useful_cards_in_starting_hands { 0 };
// Whether we initialized the values above and marked cards accordingly // Whether we initialized the values above and marked cards accordingly
bool initialized { false }; bool initialized { false };