Files
Blackjack/Deck.h
2025-07-25 10:47:31 -07:00

47 lines
557 B
C++

#ifndef DECK_H
#define DECK_H
#include <random>
#include <algorithm>
#include <iterator>
#include <vector>
#include "Card.h"
// Standard deck with 52 cards
class Deck {
public:
Deck();
Deck(bool shuffled);
void print_deck();
Card draw();
void shuffle();
auto begin() { return deck.begin(); }
auto end() { return deck.end(); }
// Getters
int get_num_cards() { return cards_in_deck; }
private:
void initialize_deck();
protected:
int cards_in_deck;
std::vector<Card> deck;
};
#endif //DECK_H