Example #1
0
def main():
    client = ShowdownClient()
    with open('config.json', 'r') as f:
        config = json.load(f)
    client.login(**config['login'])
    time.sleep(1)
    battle = client.challenge('chabons')
    if(battle):
        #Start a terminal
        terminal = code.InteractiveConsole(locals=locals())
        terminal.push('from showdown_client import ShowdownClient')
        terminal.push('from showdown_battle import ShowdownBattle, Player')
        terminal.interact()