(network)
Description: This creates a prompt for the user where they can choose to:  
    * Play a match  
    * Create/Join a room  
    * Replay a match  
    * Exit the application  
    Arguments:   
    * network: An `network`(pommerman.network.ion_client.network) object
Description: This creates a prompt for the user where they can choose to:  
    * Play a match  
    * Create/Join a room  
    * Replay a match  
    * Exit the application  
    Arguments:   
    * network: An `network`(pommerman.network.ion_client.network) object
Description : This creates a prompt for the user where they can choose to : * Play a match * Create / Join a room * Replay a match * Exit the application Arguments : * network : An network ( pommerman . network . ion_client . network ) object
def intent(network):
    """Description: This creates a prompt for the user where they can choose to:  
    * Play a match  
    * Create/Join a room  
    * Replay a match  
    * Exit the application  
    Arguments:   
    * network: An `network`(pommerman.network.ion_client.network) object  
    """
    i = ui.ask_choice(
        constants.Strings.intent.value,
        [
            constants.Strings.intent_match.value,
            constants.Strings.intent_room.value,
            constants.Strings.intent_replay.value,
            constants.Strings.intent_exit.value,
        ],
    )
    if i == constants.Strings.intent_match.value:
        agent = _agent_prompt()
        match(network, agent=agent, ui_en=True)
    elif i == constants.Strings.intent_room.value:
        room = str(ui.ask_string(constants.Strings.room_code.value))
        agent = _agent_prompt()
        match(network, room=room, agent=agent, ui_en=True)
    elif i == constants.Strings.intent_replay.value:
        replay(network, ui_en=True)
    elif i == constants.Strings.intent_exit.value:
        exit(0)
def intent ( network ) : i = ui . ask_choice ( constants . Strings . intent . value , [ constants . Strings . intent_match . value , constants . Strings . intent_room . value , constants . Strings . intent_replay . value , constants . Strings . intent_exit . value , ] , ) if i == constants . Strings . intent_match . value : agent = _agent_prompt ( ) match ( network , agent = agent , ui_en = True ) elif i == constants . Strings . intent_room . value : room = str ( ui . ask_string ( constants . Strings . room_code . value ) ) agent = _agent_prompt ( ) match ( network , room = room , agent = agent , ui_en = True ) elif i == constants . Strings . intent_replay . value : replay ( network , ui_en = True ) elif i == constants . Strings . intent_exit . value : exit ( 0 )