Add a QUIRKSTER achievement
authorCarl Worth <cworth@cworth.org>
Mon, 29 Jun 2020 17:49:22 +0000 (10:49 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 29 Jun 2020 17:49:22 +0000 (10:49 -0700)
This one recognizes the dubious achievement of submitting an entire
docket of answers with no matches with anyone else at all. Thanks to
Andrew for naming it.

empathy/empathy.jsx

index 30aa0ca12eff0152cc2b918b2e7b1e1c95b19423..b1f4ab201c71bff8265c88f79186c8234021369a 100644 (file)
@@ -1215,12 +1215,16 @@ class Game extends React.PureComponent {
           <ul>
             {state.scores.scores.map(score => {
               let perfect = null;
-              if (score.score == perfect_score) {
+              if (score.score === perfect_score) {
                 perfect = <span className="achievement">Perfect!</span>;
               }
+              let quirkster = null;
+              if (score.score === state.active_prompt.items) {
+                quirkster = <span className="achievement">Quirkster!</span>;
+              }
               return (
                 <li key={score.players[0]}>
-                  {score.players.join("/")}: {score.score} {perfect}
+                {score.players.join("/")}: {score.score} {perfect} {quirkster}
                 </li>
               );
             })}