Added more features (map toggle, return to start), made things look a lot lot lot nicer imo

This commit is contained in:
root
2019-11-28 01:14:29 +01:00
parent c61adb84e2
commit 3b6f10431f
5 changed files with 58 additions and 30 deletions

View File

@@ -216,6 +216,8 @@ class RemoveCoordView(View):
if game.challenge:
round.score = 30000
round.guess_lat = 0
round.guess_lng = 0
round.save()
next = round.order + 1
next_round = GameRound.objects.filter(
@@ -233,6 +235,7 @@ class RemoveCoordView(View):
)
)
else:
round.game.challenge.update_average_score()
return redirect(
reverse_lazy(
'game:end-recap-view',
@@ -319,7 +322,7 @@ class GameRecapView(views.UserPassesTestMixin, TemplateView):
coord_results.append(
[
[round.coord.lat, round.coord.lng],
[round.guess_lat, round.guess_lng]
[round.guess_lat if round.guess_lat else 0, round.guess_lng if round.guess_lng else 0]
]
)