]> git.cworth.org Git - lmno-server/commit
Two alterations to player scoring: per-round grouping, and round normalization
authorCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 00:21:38 +0000 (17:21 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 00:21:38 +0000 (17:21 -0700)
commit3dae3833cb5247943e27649a9b16639c2187c8c5
tree46d0df9b1d81ea6f23a60718eb310a5b1ca543a8
parent471ad8aebe1ce9a933b68cfadaffe0f68a01c255
Two alterations to player scoring: per-round grouping, and round normalization

Previously, we were returning an array of player scores where some
succesive players in the array may have had identical scores. Now,
instead, we have only one entry per score, and instead of just a
single player name, an array of player names in case there is a tie at
any score. This should help clients display per-round scores in a way
that make all the ties obvious.

Second, we were previously accumulating the per-round points directly
into a player's total. This had the defect of weighting some rounds
more than others, (rounds with more items were worth a higher maximum
number of points than rounds with fewer items). Now, instead, we only
accumulate into a player's total the number of players that they beat
out in each round. This gives an equal weight to every round.

The test suite is updated in this commit for the first fix above. But
the test suite does not yet cover the player's overall scores so that
change is not tested here.
empathy.js
test