<commit_before>import gym
from gym_minigrid.envs import Key, Ball, Box
from .verifier import *
from .levelgen import *


class Level_GoToRedBlueBall(RoomGridLevel):
    """
    Go to the red ball or to the blue ball.
    Simple level with language and exactly two different objects.
    """

    def __init__(self, room_size=8, seed=None):
        super().__init__(
            num_rows=1,
            num_cols=1,
            room_size=room_size,
            seed=seed
        )

    def gen_mission(self):
        self.place_agent()
        red_ball, _ = self.add_object(0, 0, 'ball', 'red')
        blue_ball, _ = self.add_object(0, 0, 'ball', 'blue')

        obj = self._rand_elem([red_ball, blue_ball])
        self.instrs = GoToInstr(ObjDesc(obj.type, obj.color))


class Level_OpenRedDoor(RoomGridLevel):
    """
    Go to the red door
    (always unlocked, in the current room)<commit_msg>Change to GoToRedBlueBall requested by Konrad (#83)<commit_after>import gym
from gym_minigrid.envs import Key, Ball, Box
from .verifier import *
from .levelgen import *


class Level_GoToRedBlueBall(RoomGridLevel):
    """
    Go to the red ball or to the blue ball.
    There is only one object, and therefore language is not required.
    """

    def __init__(self, room_size=8, seed=None):
        super().__init__(
            num_rows=1,
            num_cols=1,
            room_size=room_size,
            seed=seed
        )

    def gen_mission(self):
        self.place_agent()
        color = self._rand_elem(['red', 'blue'])
        obj, _ = self.add_object(0, 0, 'ball', color)
        self.instrs = GoToInstr(ObjDesc(obj.type, obj.color))


class Level_OpenRedDoor(RoomGridLevel):
    """
    Go to the red door
    (always unlocked, in the current room)
{'fraction_non_alphanumeric': 0.10424929178470255, 'fraction_numerical': 0.00793201133144476, 'mean_word_length': 2.633744855967078, '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': '7194314', 'n_tokens_mistral': 578, 'n_tokens_neox': 554, 'n_words': 154}