from typing import Tuple


def get_mode(mode: str, line: str) -> Tuple[str, bool]:
    """Get the mode of the map.

    Args:
        mode (str): the current mode
        line (str): the line to check

    Returns:
        str, bool: the new mode, if the mode has changed
    """
    if line == "" or line[0] == "#":
        return mode, True
    elif line.startswith("terrain"):
        return "terrain", False
    elif line.startswith("bounds"):
        return "bounds", False
    elif line.startswith("players"):
        return "players", False
    else:
        return mode, False