<commit_before>from actions import CompositeAndOrAction, Action
from actions.take import TestAction, TestAction2

__author__ = 'djw'


class TestCompositeFieldAction(CompositeAndOrAction):
    """
    Filler while other actions are not yet implemented, does nothing
    """

    subactions = {
        'a': TestAction(),
        'b': TestAction2(),
    }

    def describe(self):
        return 'Composite and/or action to be implemented later.'


class BuildRoomAction(Action):
    """
    Builds a room in an available space on the player's field
    """

    def __init__(self):
        self.material = None

    def update(self):
        pass

    def process(self, player, **kwargs):
        player.field.draw()
        # TODO: set material
        # TODO: ask for build coordinates
        # TODO: try build, catch errors

    def describe(self):
        return 'Build a new room for your house.'<commit_msg>make buildroomaction.process skeleton clearer<commit_after>from actions import CompositeAndOrAction, Action
from actions.take import TestAction, TestAction2

__author__ = 'djw'


class TestCompositeFieldAction(CompositeAndOrAction):
    """
    Filler while other actions are not yet implemented, does nothing
    """

    subactions = {
        'a': TestAction(),
        'b': TestAction2(),
    }

    def describe(self):
        return 'Composite and/or action to be implemented later.'


class BuildRoomAction(Action):
    """
    Builds a room in an available space on the player's field
    """

    def __init__(self):
        self.material = None

    def update(self):
        pass

    def process(self, player, **kwargs):
        # TODO: set material
        # TODO: validate player has resources
        player.draw()
        # TODO: ask for build coordinates
        # TODO: try build, catch errors

    def describe(self):
        return 'Build a new room for your house.'
{'fraction_non_alphanumeric': 0.08842105263157894, 'fraction_numerical': 0.002105263157894737, 'mean_word_length': 2.698443579766537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7446545', 'n_tokens_mistral': 523, 'n_tokens_neox': 500, 'n_words': 181}