From 55c61e99b436db3370f92107a680f86437831899 Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Thu, 30 May 2024 11:45:50 -0700 Subject: [PATCH] added appearing/disappearing box to test case --- Server/testing servers/dummy_tracker_server.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Server/testing servers/dummy_tracker_server.py b/Server/testing servers/dummy_tracker_server.py index 5757bfb..a14d4e1 100644 --- a/Server/testing servers/dummy_tracker_server.py +++ b/Server/testing servers/dummy_tracker_server.py @@ -8,6 +8,9 @@ async def handle_client(websocket, path): print("packet connected") socket_connections[websocket] = "" + + internal_count = 0 + show_4 = False try: while True: @@ -16,7 +19,14 @@ async def handle_client(websocket, path): if data == "Type?": await websocket.send("Automated") else: - await websocket.send("[1] 100:100 200:700\n[2] 250:250 750:750\n[3] 500:300 800:800") + internal_count += 1 + if internal_count > 100: + show_4 = not show_4 + internal_count = 1 + if show_4: + await websocket.send("[1] 100:100 200:700\n[2] 250:250 750:750\n[3] 500:300 800:800\n[4] 50:150 300:600") + else: + await websocket.send("[1] 100:100 200:700\n[2] 250:250 750:750\n[3] 500:300 800:800") except websockets.exceptions.ConnectionClosed: print("Connection closed with: ", websocket.remote_address) finally: