class Observer:
    def update(self, event):
        raise NotImplementedError


class ConsoleView(Observer):
    def update(self, event):
        if isinstance(event, dict) and event.get("type") == "message":
            print(event["text"])
        elif isinstance(event, dict) and event.get("type") == "render":
            maze = event["maze"]
            path = event.get("path")
            player = event.get("player")
            print(maze.render(path=path, player_position=player))
            print()