Skip to content

Commit 8709199

Browse files
committed
Update presentation of scores
1 parent d69e506 commit 8709199

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

static/game_map_fifty_result.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ async function initMap() {
5252

5353
// Content for Info Window on submit.html
5454
let message
55+
let score
5556
let review
5657
let body
5758
let try_again
@@ -60,12 +61,13 @@ async function initMap() {
6061
// Incorrect
6162
if (submit_attempts < 6) {
6263
message = 'incorrect';
64+
score = 'Score: na';
6365
review = '';
6466
body =
6567
'Attempts: ' + submit_attempts + '<br>' +
6668
'Current Total Time: ' + duration_total + '<br><br>' +
67-
'Base Score: ' + base_score + '<br>' +
68-
'Bonus Score: ' + bonus_score + '<br>';
69+
'Base Score: na<br>' +
70+
'Bonus Score: na<br>';
6971
try_again =
7072
'<div class="infowindow-result-footer-try">' +
7173
'<form name="router" action="/fifty/results" method="post">' +
@@ -80,6 +82,7 @@ async function initMap() {
8082
'</div>';
8183
} else {
8284
message = 'incorrect';
85+
score = 'Score: na';
8386
review =
8487
'<div class="infowindow-result-title-right-review">' +
8588
'<form name="router" action="/fifty/results" method="post">' +
@@ -111,6 +114,7 @@ async function initMap() {
111114
} else if (submit_validation == 2) {
112115
// Quit
113116
message = 'quit';
117+
score = 'Score: 0 pts';
114118
review =
115119
'<div class="infowindow-result-title-right-review">' +
116120
'<form name="router" action="/fifty/results" method="post">' +
@@ -139,6 +143,7 @@ async function initMap() {
139143
} else if (submit_validation == 1) {
140144
// Correct
141145
message = 'correct!';
146+
score = 'Score: ' + game_score + ' pts';
142147
review =
143148
'<div class="infowindow-result-title-right-review">' +
144149
'<form name="router" action="/fifty/results" method="post">' +
@@ -174,8 +179,8 @@ async function initMap() {
174179
message +
175180
'</div>' +
176181
'<div class="infowindow-result-title-right">' +
177-
'Score: ' + game_score + ' pts' +
178-
review +
182+
score +
183+
review +
179184
'</div>' +
180185
'</div>' +
181186
'<div class="infowindow-result-body">' +

0 commit comments

Comments
 (0)