<commit_before>//
// Created by Sam on 3/1/2018.
//

#include <utility>

#include "../../../../include/Game/Core/Containers/Deck.h"

json Deck::getJSON()
{
    return Exportable::getJSON();
}

Deck::Deck(std::string deckID, std::vector<std::shared_ptr<Card>> cards)
        : deckID(std::move(deckID)), cards(std::move(cards))
{
}

Deck::~Deck()
= default;<commit_msg>Implemented the getJSON function for the deck class<commit_after>//
// Created by Sam on 3/1/2018.
//

#include <utility>

#include "../../../../include/Game/Core/Containers/Deck.h"
#include "../../../../include/Game/Core/Card.h"

json Deck::getJSON()
{
    std::vector<json> jsonCards;

    for (const auto &card : cards)
    {
        jsonCards.push_back(card->getJSON());
    }

    json rawJSON;

    rawJSON["deckID"] = deckID;
    rawJSON["cards"] = jsonCards;

    return rawJSON;
}

Deck::Deck(std::string deckID, std::vector<std::shared_ptr<Card>> cards)
        : deckID(std::move(deckID)), cards(std::move(cards))
{
}

Deck::~Deck()
= default;
{'fraction_non_alphanumeric': 0.21037181996086105, 'fraction_numerical': 0.011741682974559686, 'mean_word_length': 3.4285714285714284, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7568570', 'n_tokens_mistral': 385, 'n_tokens_neox': 375, 'n_words': 66}