From a085eaff6d5e803b1257d85edb85ed6cd4b6c85d Mon Sep 17 00:00:00 2001 From: frank Date: Wed, 10 Jan 2024 10:03:04 -0800 Subject: [PATCH] use most recent score object to transfer time in milliseconds --- NS.py | 4 ++-- resource/scores | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/NS.py b/NS.py index 1f08ca8..b056a9c 100644 --- a/NS.py +++ b/NS.py @@ -477,7 +477,7 @@ class NS(Game, Animation): elif self.boss.player_defeated: status = "lost" else: - status = f"complete {boss.time_elapse}" + status = f"complete {self.most_recent_score.milliseconds}" # Connect and send status message to each peer. If sending fails, pass and wait until the next iteration. for peer in self.peers.values(): @@ -504,7 +504,7 @@ class NS(Game, Animation): message = incoming[0].recv(64).decode() if message.startswith("complete"): try: - peer.result = float(message.split()[-1]) + peer.result = int(message.split()[-1]) peer.status = "complete" except: # Improperly formatted message received diff --git a/resource/scores b/resource/scores index b3c51e7..e69de29 100644 --- a/resource/scores +++ b/resource/scores @@ -1 +0,0 @@ -40143 0