class RoomError(Exception):
    pass

class Room:

    def __init__(self, floor, id, weight = 1, tags = []):
        if not isinstance(floor, (int, float)):
            raise RoomError("The floor must be a int or float")
        if not isinstance(weight, (int, float)):
            raise RoomError("The weight must be a int or float")
        if not isinstance(id, str):
            raise RoomError("The id must be a str")
        if isinstance(tags,list):
            for e in tags:
                if not isinstance(e, str):
                    raise RoomError("The tags must be a list str")
        else:
            raise RoomError("The tag must be a list str")

        self.floor = floor
        self.id = id
        self.weight = weight
        self.tags = tags

class Enemy(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "enemy"

class Trapped(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "trapped"

class Challenge(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "challenge"

class Armory(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "armory"

class Shop(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "shop"

class Boss(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "boss"

class Spawn(Room):

    def __init__(self, floor, id, weight = 1, tags = []):
        super().__init__(floor, id, weight, tags)

        self.type = "spawn"

class Wall(Room):

    def __init__(self, floor, id, type, weight = 1):
        super().__init__(floor, id, weight, [])

        self.type = "wall"
        self.wall_type = type
