diff --git a/django/play/consumers/game.py b/django/play/consumers/game.py index 5cd50e4..14b7e7d 100644 --- a/django/play/consumers/game.py +++ b/django/play/consumers/game.py @@ -194,7 +194,7 @@ class GameConsumer(AsyncWebsocketConsumer): @database_sync_to_async def save_answer_map(self, participant_id, answer_location, time_remaining): - answer_index = -1 + answer_index = 0 try: # Get all necessary data first participant = QuizGameParticipant.objects.get( @@ -207,9 +207,6 @@ class GameConsumer(AsyncWebsocketConsumer): target_location = question_data['target_location'] tolerance_radius = question_data.get('tolerance_radius', 1000) # Default 1km if not set - print(f"Raw target_location: {target_location}") - print(f"Raw answer_location: {answer_location}") - print(f"tolerance_radius: {tolerance_radius}") # Parse coordinates if they are strings def parse_coords(coord): @@ -242,11 +239,9 @@ class GameConsumer(AsyncWebsocketConsumer): is_correct = False score = 0 else: - print(f"Parsed target_location: {target_location}") - print(f"Parsed answer_location: {answer_location}") # Configuration - Make these easily adjustable - MAX_DISTANCE_KM = 1000 # Maximum distance for scoring (in km) + MAX_DISTANCE_KM = 200 # Maximum distance for scoring (in km) DIRECT_HIT_BONUS = 200 # Extra points for direct hit within tolerance try: