<commit_before>// Copyright (c) 2018 <NAME>, <NAME>, <NAME>

// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.

#include <hspp/Accounts/DeckInfo.hpp>
#include <hspp/Cards/Cards.hpp>

#include <algorithm>
#include <iostream>

namespace Hearthstonepp
{
DeckInfo::DeckInfo() : m_name("Empty")
{
    // Do nothing
}

DeckInfo::DeckInfo(std::string name, const CardClass deckClass)
    : m_name(std::move(name)), m_class(deckClass)
{
    // Do nothing
}

std::string DeckInfo::GetName() const
{
    return m_name;
}

CardClass DeckInfo::GetClass() const
{
    return m_class;
}

std::size_t DeckInfo::GetNumOfCards() const
{
    return m_numOfCards;
}

std::size_t DeckInfo::GetUniqueNumOfCards() const
{
    return m_cards.size();
}

std::size_t DeckInfo::GetNumCardInDeck(std::string cardID)
{
    const auto cardIer = std::find_if(
        m_cards.begin(), m_cards.end(),
        [&cardID](const std::pair<std::string, std::size_t>& elem) {
            return elem.first == cardID;
        });

    // A card is in deck
    if (cardIer != m_cards.end())
    {
        return (*cardIer).second;
    }

    return 0;
}

std::vector<Card> DeckInfo::GetPrimitiveDeck() const
{
    std::vector<Card> deck;

    for (const auto& [id, num] : m_cards)
    {
        Card card = Cards::GetInstance().FindCardByID(id);

        for (std::size_t i = 0; i < num; ++i)
        {
            deck.push_back(card);<commit_msg>fix: Correct typo<commit_after>// Copyright (c) 2018 <NAME>, <NAME>, <NAME>

// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.

#include <hspp/Accounts/DeckInfo.hpp>
#include <hspp/Cards/Cards.hpp>

#include <algorithm>
#include <iostream>

namespace Hearthstonepp
{
DeckInfo::DeckInfo() : m_name("Empty")
{
    // Do nothing
}

DeckInfo::DeckInfo(std::string name, const CardClass deckClass)
    : m_name(std::move(name)), m_class(deckClass)
{
    // Do nothing
}

std::string DeckInfo::GetName() const
{
    return m_name;
}

CardClass DeckInfo::GetClass() const
{
    return m_class;
}

std::size_t DeckInfo::GetNumOfCards() const
{
    return m_numOfCards;
}

std::size_t DeckInfo::GetUniqueNumOfCards() const
{
    return m_cards.size();
}

std::size_t DeckInfo::GetNumCardInDeck(std::string cardID)
{
    const auto cardIter = std::find_if(
        m_cards.begin(), m_cards.end(),
        [&cardID](const std::pair<std::string, std::size_t>& elem) {
            return elem.first == cardID;
        });

    // A card is in deck
    if (cardIter != m_cards.end())
    {
        return (*cardIter).second;
    }

    return 0;
}

std::vector<Card> DeckInfo::GetPrimitiveDeck() const
{
    std::vector<Card> deck;

    for (const auto& [id, num] : m_cards)
    {
        Card card = Cards::GetInstance().FindCardByID(id);

        for (std::size_t i = 0; i < num; ++i)
        {
            deck.push_back(card);
{'fraction_non_alphanumeric': 0.14322664080181055, 'fraction_numerical': 0.0038797284190106693, 'mean_word_length': 3.376237623762376, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '4208478', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1081, 'n_words': 255}