diff --git a/geogame/main/views.py b/geogame/main/views.py index 0b6fdb8..f10758b 100644 --- a/geogame/main/views.py +++ b/geogame/main/views.py @@ -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] ] ) diff --git a/geogame/templates/main/game_recap.html b/geogame/templates/main/game_recap.html index 7948434..82d9703 100644 --- a/geogame/templates/main/game_recap.html +++ b/geogame/templates/main/game_recap.html @@ -17,7 +17,7 @@ Your average guess was {{average_distance|intcomma}}m away.{% if all_average %} The average for this challenge is {{all_average|intcomma}}m{%endif%} -
+
Homepage diff --git a/geogame/templates/main/homepage.html b/geogame/templates/main/homepage.html index bbd09fe..68aaa42 100644 --- a/geogame/templates/main/homepage.html +++ b/geogame/templates/main/homepage.html @@ -69,9 +69,7 @@

For now I have managed to find some data on uk coordinates that I can use, but its not so easy getting data for other countries.

I didn't receive my email reset password, what gives?

I am using a free mail server to send password reset emails, the limit is 100/day.

-

If you require assisstance accessing your account, please email edward.wilding3@gmail.com

-

This site is atrocious and you should feel bad

-

Firstly that isn't a question, secondly that hurts my feelings, thirdly I built it in 2 days after geoguessr changed their site.

+

If you require assistance accessing your account, please email edward.wilding3@gmail.com

This site is amazing, how can I contact you to discuss this, or another, site?

Thank you! Please get in touch: edward.wilding3@gmail.com

diff --git a/geogame/templates/main/round.html b/geogame/templates/main/round.html index 99bfaab..754863d 100644 --- a/geogame/templates/main/round.html +++ b/geogame/templates/main/round.html @@ -2,41 +2,39 @@ {% block content %} -
-
-
- {% if messages %} +{% if messages %} +
+
+
{% for message in messages %}
{{ message }}
{% endfor %} - {% endif %} - - -
- +
-
-
+{% endif %} -
-
- {{ form.non_field_errors }} - {% csrf_token %} - {{form.as_p}} - -
+
-
- {% csrf_token %} - -
+
-
-
+
+ + +
+ {{ form.non_field_errors }} + {% csrf_token %} + {{form.as_p}} + +
+ +
+ {% csrf_token %} + +