]> git.cworth.org Git - empires-server/commit
Empathy: Use word groups to assign scores to players, not their lists
authorCarl Worth <cworth@cworth.org>
Thu, 11 Jun 2020 23:37:43 +0000 (16:37 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 11 Jun 2020 23:37:43 +0000 (16:37 -0700)
commit507128bb32b242b5a61a180fcb352486b5116280
tree523060d121a663a90344372cf6359991d35933a4
parentfa3bdc8a5207fc93f4d720771cb6155913f06262
Empathy: Use word groups to assign scores to players, not their lists

Previously, we were marching through each players list of words and
looking each word up in the word groups to find a score for that
word. This worked in general, but failed in a specific case:

If a player had two different words that were considered by the group
to be equivalent, that player received the score for that word
twice. To avoid giving a palyer in this situation points that the
group clearly didn't consider they deserved, we instead iterative over
the worud groups themselves to assign points out to players.

This means that when a player ends up having two (or more) words that
end up being equivalent, (based on the team consensus when judging),
all but one of those words will be worth nothing.
empathy.js