Teilnehmer_Koordinaten-einzeichnen
This commit is contained in:
@@ -232,8 +232,10 @@ class GameConsumer(AsyncWebsocketConsumer):
|
||||
|
||||
# Parse the coordinates
|
||||
target_location = parse_coords(target_location)
|
||||
answer_location_coords = answer_location
|
||||
answer_location = parse_coords(answer_location)
|
||||
|
||||
|
||||
if not target_location or not answer_location:
|
||||
print("Invalid coordinates, cannot calculate score")
|
||||
is_correct = False
|
||||
@@ -312,6 +314,7 @@ class GameConsumer(AsyncWebsocketConsumer):
|
||||
|
||||
participant.last_score = score
|
||||
participant.score += score
|
||||
participant.coordinate_answer= answer_location_coords
|
||||
participant.last_answer_correct = is_correct
|
||||
participant.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user