From 9d6353be79d412cba19307f17eb7ab071a8d9509 Mon Sep 17 00:00:00 2001 From: marsteralex Date: Mon, 19 Sep 2022 01:58:44 +0200 Subject: [PATCH] add checkmarks and x's --- web/public/mtg/app.js | 16 ++++++++++------ web/public/mtg/guess.html | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/web/public/mtg/app.js b/web/public/mtg/app.js index ecd826f0..3a52aa9d 100644 --- a/web/public/mtg/app.js +++ b/web/public/mtg/app.js @@ -186,11 +186,7 @@ function determineIfSkip(card) { } if (firstPrint) { if (whichGuesser == 'basic') { - if ( - card.set_type !== 'expansion' && - card.set_type !== 'funny' && - card.set_type !== 'draft_innovation' - ) { + if (card.set_type !== 'expansion' && card.set_type !== 'funny') { return true } } else if (whichGuesser == 'artist') { @@ -344,6 +340,8 @@ function checkAnswers() { incorrect = ans !== guess // decide if their guess was correct // window.console.log(ans, guess, incorrect) + correctAns = String.fromCodePoint(0x2705) + ' ' + ansWithSymbol + incorrectAns = String.fromCodePoint(0x274c) + ' ' + guessWithSymbol if (incorrect) { window.console.log( document.getElementById(currCard.dataset.name), @@ -351,7 +349,13 @@ function checkAnswers() { ans ) document.getElementById(currCard.dataset.name).innerHTML = - '' + guessWithSymbol + '
' + ansWithSymbol + incorrectAns + + '
' + + String.fromCodePoint(0x274c) + + ' ' + + ansWithSymbol + } else { + document.getElementById(currCard.dataset.name).innerHTML = correctAns } } if (incorrect) { diff --git a/web/public/mtg/guess.html b/web/public/mtg/guess.html index 11c87b24..df832ea8 100644 --- a/web/public/mtg/guess.html +++ b/web/public/mtg/guess.html @@ -291,7 +291,8 @@
- : + :