Skip to content

Commit

Permalink
Merge pull request #298 from anthony5301/main
Browse files Browse the repository at this point in the history
Improve checking in queue()
  • Loading branch information
anthony5301 authored Feb 8, 2024
2 parents cbfd8b0 + 9039560 commit adc0a58
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions auto_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def queue() -> None:
"""Function that handles getting into a game"""
client_info: tuple = get_client()
while check_game_status(client_info) == "InProgress":
sleep(1)
sleep(2)
if check_game_status(client_info) == "Reconnect":
print(" Reconnecting")
reconnect(client_info)
Expand All @@ -149,22 +149,15 @@ def queue() -> None:
change_arena_skin(client_info)

sleep(3)
while not check_queue(client_info):
sleep(5)
create_lobby(client_info)
sleep(3)
start_queue(client_info)
sleep(1)

in_queue = True
time = 0
while in_queue:
if time % 60 == 0:
while state := check_game_status(client_info):
if state == "None":
create_lobby(client_info)
sleep(5)
if state == "Lobby":
start_queue(client_info)
accept_queue(client_info)
if check_game_status(client_info) == "InProgress":
in_queue = False
sleep(1)
time += 1
if state == "ReadyCheck":
accept_queue(client_info)
print(" Accepting")
if state == "InProgress":
return
sleep(3)

0 comments on commit adc0a58

Please sign in to comment.