# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):
# 
# Path: MTG/utils.py
# def get_card_from_user_input(player, string):
# def choose_targets(source):
# def parse_targets(criterias):
# def parse_ability_costs(cost):


import pdb
import time
import math
from collections import defaultdict, namedtuple
from sortedcontainers import SortedListWithKey
from MTG import cardtype
from MTG import static_abilities
from MTG import utils
    is_token = False

    target_criterias = None  # if targets, this is a list of boolean functions
    target_prompts = None  # list of strings
    targets_chosen = None

    def __init__(self, characteristics=None,
                 controller=None, owner=None, zone=None, 
                 previousState=None):
        if not characteristics:
            characteristics = Characteristics()
        self.characteristics = characteristics
        self.controller = controller
        self._owner = owner
        self.zone = zone
        self.previousState = previousState
        self.effects = defaultdict(lambda: SortedListWithKey(
                                           [], lambda x : x.timestamp))

        self.timestamp = self.game.timestamp if self.game else None


    def __repr__(self):
        return '%r in %r (ID: %r)' % (self.name,
                         self.zone.zone_type if self.zone is not None else 'None',
                         id(self))

    def __str__(self):
        return str(self.name)


# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):
# 
# Path: MTG/utils.py
# def get_card_from_user_input(player, string):
# def choose_targets(source):
# def parse_targets(criterias):
# def parse_ability_costs(cost):


# Path: MTG/gameobject.py
import pdb
import time
import math
from collections import defaultdict, namedtuple
from sortedcontainers import SortedListWithKey
from MTG import cardtype
from MTG import static_abilities
from MTG import utils

    is_token = False

    target_criterias = None  # if targets, this is a list of boolean functions
    target_prompts = None  # list of strings
    targets_chosen = None

    def __init__(self, characteristics=None,
                 controller=None, owner=None, zone=None, 
                 previousState=None):
        if not characteristics:
            characteristics = Characteristics()
        self.characteristics = characteristics
        self.controller = controller
        self._owner = owner
        self.zone = zone
        self.previousState = previousState
        self.effects = defaultdict(lambda: SortedListWithKey(
                                           [], lambda x : x.timestamp))

        self.timestamp = self.game.timestamp if self.game else None


    def __repr__(self):
        return '%r in %r (ID: %r)' % (self.name,
                         self.zone.zone_type if self.zone is not None else 'None',
                         id(self))

    def __str__(self):
        return str(self.name)


    def __eq__(x, y):