X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=b9579a6893e2a9b91ea28f8da34da2182e4c75b9;hp=2511250dd923ebfb2d9978c8e0c60e9e03a193d6;hb=11b1bab7b7ab4bc2c1e1f556a526baf1f01e2041;hpb=d74ef20a871a9548097e3ef4fb3539c2b6a5d0dc diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 2511250..b9579a6 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -433,7 +433,7 @@ const PromptOptions = React.memo(props => { const LetsPlay = React.memo(props => { - const quorum = Math.round((props.num_players + 1) / 2); + const quorum = Math.max(0, props.num_players - props.prompts.length); const max_votes = props.prompts.reduce( (max_so_far, v) => Math.max(max_so_far, v.votes.length), 0); @@ -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 + })) } ); @@ -829,7 +832,9 @@ class ActivePrompt extends React.PureComponent { className="vote-button" onClick={() => fetch_post_json(`end-answers/${this.props.prompt.id}`) } > - Move On Without Their Answers + {answering_players.length ? + "Move On Without Their Answers" : + "Move On Without Anyone Else"}
{[...this.props.votes].map(v => { return ( @@ -1213,12 +1218,18 @@ class Game extends React.PureComponent {