fix bug in tailor calculation
The tailor calculation did not go down to one point if the losing team scored points only after the winning team reached the tailor goal. This has been fixed. This made me realize that I forgot to write tests for the `results` property of the game and session models. Those will follow in a later commit.
This commit is contained in:
parent
b89206f113
commit
bcb08a64d2
@ -106,7 +106,11 @@ export default class Game extends EventTarget {
|
|||||||
let points;
|
let points;
|
||||||
if (tailor !== null && winner !== tailor) {
|
if (tailor !== null && winner !== tailor) {
|
||||||
points = 4;
|
points = 4;
|
||||||
} else if (tailor !== null && winner === tailor) {
|
} else if (
|
||||||
|
tailor !== null
|
||||||
|
&& winner === tailor
|
||||||
|
&& (ourPoints === 0 || theirPoints === 0)
|
||||||
|
) {
|
||||||
points = 2;
|
points = 2;
|
||||||
} else {
|
} else {
|
||||||
points = 1;
|
points = 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user