Skip to content

Commit

Permalink
spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpllu committed Jan 28, 2024
1 parent 16895cb commit 24cac64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@
footer.style.display = 'none';
const timeTaken = (new Date() - startTime) / 1000;
const score = calculateScore(gameDisplay.textContent.length, timeTaken);
let scoreText = `Score: ${score}<br>High Score: ${highScore}`
let scoreText = `Score ${score}<br><br>High Score ${highScore}`
if (score > highScore) {
highScore = score;
scoreText = `<br>New High Score! ${score}`;
scoreText = `<br><span style="color: yellow">New High Score! ${score}</span>`;
localStorage.setItem('highScore', score);
}
scoreMessage.innerHTML = `${Math.floor((gameDisplay.textContent.length - 1) / 2)} ha's<br/>${timeTaken.toFixed(2)} seconds<br>${scoreText}`;
scoreMessage.innerHTML = `${Math.floor((gameDisplay.textContent.length - 1) / 2)} ha's<br><br>${timeTaken.toFixed(2)}s<br><br>${scoreText}`;
scoreMessage.classList.remove('hidden');
resultDisplay.style.display = 'block';
setTimeout(function() {
Expand Down

0 comments on commit 24cac64

Please sign in to comment.