<commit_before>﻿using HarryPotterUnity.Game;
using JetBrains.Annotations;
using UnityEngine;

namespace HarryPotterUnity.Cards.PlayRequirements
{
    public class InputRequirement : MonoBehaviour, ICardPlayRequirement
    {
        private BaseCard _cardInfo;

        [SerializeField, UsedImplicitly]
        private int _fromHandActionInputRequired;

        [SerializeField, UsedImplicitly]
        private int _inPlayActionInputRequired;

        public int FromHandActionInputRequired { get { return _fromHandActionInputRequired; } }
        public int InPlayActionInputRequired { get { return _inPlayActionInputRequired; } }

        private void Awake()
        {
            _cardInfo = GetComponent<BaseCard>();
            if (GetComponent<InputGatherer>() == null)
            {
                gameObject.AddComponent<InputGatherer>();   
            }
        }

        public bool MeetsRequirement()
        {
            return _cardInfo.GetFromHandActionTargets().Count >= _fromHandActionInputRequired;
        }

        public void OnRequirementMet() { }
    }
}<commit_msg>Add TODO for Input Requirement<commit_after>﻿using HarryPotterUnity.Game;
using JetBrains.Annotations;
using UnityEngine;

namespace HarryPotterUnity.Cards.PlayRequirements
{
    public class InputRequirement : MonoBehaviour, ICardPlayRequirement
    {
        private BaseCard _cardInfo;

        [SerializeField, UsedImplicitly]
        private int _fromHandActionInputRequired;

        [SerializeField, UsedImplicitly]
        private int _inPlayActionInputRequired;

        public int FromHandActionInputRequired { get { return _fromHandActionInputRequired; } }
        public int InPlayActionInputRequired { get { return _inPlayActionInputRequired; } }

        private void Awake()
        {
            _cardInfo = GetComponent<BaseCard>();
            if (GetComponent<InputGatherer>() == null)
            {
                gameObject.AddComponent<InputGatherer>();   
            }
        }

        public bool MeetsRequirement()
        {
            //TODO: Need to check whether this needs to check the FromHandActionTargets or the InPlayActionTargets!
            return _cardInfo.GetFromHandActionTargets().Count >= _fromHandActionInputRequired;
        }

        public void OnRequirementMet() { }
    }
}
{'fraction_non_alphanumeric': 0.06813281586890901, 'fraction_numerical': 0.0, 'mean_word_length': 2.712, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7489603', 'n_tokens_mistral': 612, 'n_tokens_neox': 596, 'n_words': 130}