()
Description: Starts up the application normally by asking the user about
    the server they want to connect to
Description: Starts up the application normally by asking the user about
    the server they want to connect to
Description : Starts up the application normally by asking the user about the server they want to connect to
def init():
    """Description: Starts up the application normally by asking the user about
    the server they want to connect to"""
    if ui.ask_yes_no(constants.Strings.server_prompt.value):
        domain = ui.ask_string(constants.Strings.server_ip.value)
        if domain is None:
            ui.fatal(constants.Exceptions.invalid_ip.value)
    else:
        domain = "play.pommerman.com:5050"
    ui.info(
        constants.Strings.server_connecting_p1.value,
        ui.yellow,
        constants.Strings.server_connecting_p2.value,
        ui.reset,
        constants.Strings.server_connecting_p3.value,
    )
    network = Network(domain)
    try:
        status = network.server_status()
    except Exception as e:
        ui.fatal(e)
    signal.signal(signal.SIGINT, _exit_handler)
    ui.info(
        constants.Strings.server_connected.value,
        ui.yellow,
        constants.Strings.server_players.value,
        str(status[0]) + ",",
        constants.Strings.server_matches.value,
        status[1],
    )
    intent(network)
def init ( ) : if ui . ask_yes_no ( constants . Strings . server_prompt . value ) : domain = ui . ask_string ( constants . Strings . server_ip . value ) if domain is None : ui . fatal ( constants . Exceptions . invalid_ip . value ) else : domain = "play.pommerman.com:5050" ui . info ( constants . Strings . server_connecting_p1 . value , ui . yellow , constants . Strings . server_connecting_p2 . value , ui . reset , constants . Strings . server_connecting_p3 . value , ) network = Network ( domain ) try : status = network . server_status ( ) except Exception as e : ui . fatal ( e ) signal . signal ( signal . SIGINT , _exit_handler ) ui . info ( constants . Strings . server_connected . value , ui . yellow , constants . Strings . server_players . value , str ( status [ 0 ] ) + "," , constants . Strings . server_matches . value , status [ 1 ] , ) intent ( network )