# Path: MTG/cards.py
# SETPREFIX = ['M15', 'sm_set', 'cube']
#     ID = name_to_id(name)
# def id_to_name(ID):
# def name_to_id(name):
# def str_to_class(str):
# def card_from_name(name, get_instance=True):
# def read_deck(filename):
# def add_activated_ability(cardname, cost, effect, target_criterias=None, prompts=None):
# def add_targets(cardname, criterias=[lambda self, p: True], prompts=None):
# def add_play_func_with_targets(cardname, outcome=lambda self, t, l: True):
#     def play_func(self):
# def add_play_func_no_target(cardname, outcome=lambda self: True):
# def add_aura_effect(cardname, effects, target_criterias=['creature']):
# def add_trigger(cardname, condition, effect, requirements=None,
#                 target_criterias=None, target_prompts=None, intervening_if=None):
# def add_static_effect(cardname, apply_to, name, value, toggle_func=lambda eff: False):
# def indentation_lv(s):
# def parse_card_from_lines(lines, log=None):
# def setup_cards(FILES=['data/m15_cards.txt', 'data/cube_cards.txt']):


import mock
import sys
import os
from MTG.game import *
from MTG import cards


cards.setup_cards()

with mock.patch('builtins.input', side_effect=[
        's main',
        's main',
        '__self.discard(7)', '',
        '__self.discard(7)', '',
        '__self.add_card_to_hand("Path to Exile")',
        '__self.battlefield.add("Sungrace Pegasus")',
        '', '',
        's upkeep', 's upkeep',
        's upkeep', 's upkeep',
        '',
        ''
        ]):

# Path: MTG/cards.py
# SETPREFIX = ['M15', 'sm_set', 'cube']
#     ID = name_to_id(name)
# def id_to_name(ID):
# def name_to_id(name):
# def str_to_class(str):
# def card_from_name(name, get_instance=True):
# def read_deck(filename):
# def add_activated_ability(cardname, cost, effect, target_criterias=None, prompts=None):
# def add_targets(cardname, criterias=[lambda self, p: True], prompts=None):
# def add_play_func_with_targets(cardname, outcome=lambda self, t, l: True):
#     def play_func(self):
# def add_play_func_no_target(cardname, outcome=lambda self: True):
# def add_aura_effect(cardname, effects, target_criterias=['creature']):
# def add_trigger(cardname, condition, effect, requirements=None,
#                 target_criterias=None, target_prompts=None, intervening_if=None):
# def add_static_effect(cardname, apply_to, name, value, toggle_func=lambda eff: False):
# def indentation_lv(s):
# def parse_card_from_lines(lines, log=None):
# def setup_cards(FILES=['data/m15_cards.txt', 'data/cube_cards.txt']):


# Path: MTG/game_sample_test.py
import mock
import sys
import os
from MTG.game import *
from MTG import cards



cards.setup_cards()

with mock.patch('builtins.input', side_effect=[
        's main',
        's main',
        '__self.discard(7)', '',
        '__self.discard(7)', '',
        '__self.add_card_to_hand("Path to Exile")',
        '__self.battlefield.add("Sungrace Pegasus")',
        '', '',
        's upkeep', 's upkeep',
        's upkeep', 's upkeep',
        '',
        ''
        ]):

    decks = [cards.read_deck('data/decks/deck1.txt'),