X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=6e98b327be7ceea20096c3a4e5eb56f3d95c3f0d;hp=b1f4ab201c71bff8265c88f79186c8234021369a;hb=5fb4dec0d3dc03696ec2d00788d2d657a23b8bd1;hpb=e18a603f7a9387f29bbb69ff48d88f597a195d69 diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index b1f4ab2..6e98b32 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -508,8 +508,11 @@ class Ambiguities extends React.PureComponent { const response = await fetch_post_json( `judged/${this.props.prompt.id}`,{ - word_groups: this.state.word_sets.map(set => Array.from(set)), - kudos: this.state.starred ? Array.from(this.state.starred) : null + word_groups: this.state.word_sets.map( + set => ({ + words: Array.from(set), + kudos: this.state.starred === set ? true : false + })) } ); @@ -1224,7 +1227,9 @@ class Game extends React.PureComponent { } return (
  • - {score.players.join("/")}: {score.score} {perfect} {quirkster} + {score.players.join("/")}: {score.score} + {score.kudos ? `, ${'★'.repeat(score.kudos)}` : ""} + {perfect} {quirkster}
  • ); })} @@ -1234,7 +1239,9 @@ class Game extends React.PureComponent { {state.scores.words.map(word => { return (
  • - {word.word} ({word.players.length}): {word.players.join(', ')} + {word.word} ({word.players.length} + {word.kudos.length ? `, ${'★'.repeat(word.kudos.length)}` : ""} + ): {word.players.join(', ')}
  • ); })}