From 75b56ee03b0db7908b20bcde4ed099153dda86dc Mon Sep 17 00:00:00 2001 From: Martin Spanel Date: Sat, 4 Jul 2020 23:16:50 +0200 Subject: [PATCH] fixed lint errors --- src/js/game/hub_goals.js | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/src/js/game/hub_goals.js b/src/js/game/hub_goals.js index d44066ca..45037d2f 100644 --- a/src/js/game/hub_goals.js +++ b/src/js/game/hub_goals.js @@ -320,7 +320,6 @@ export class HubGoals extends BasicSerializableObject { return true; } - /* picks given number of colors that are close on the color wheel */ @@ -342,7 +341,6 @@ export class HubGoals extends BasicSerializableObject { return pickedColors; } - /** * @returns {ShapeDefinition} */ @@ -355,15 +353,37 @@ export class HubGoals extends BasicSerializableObject { let pickedSymmetry = null; // pairs of quadrants that must be the same let availableShapes = [enumSubShape.rect, enumSubShape.circle, enumSubShape.star]; if (Math.random() < 0.5) { - pickedSymmetry = [[0, 2], [1, 3]]; // radial symmetry - availableShapes.push(enumSubShape.windmill); // windmill looks good only in radial symmetry + pickedSymmetry = [ + // radial symmetry + [0, 2], + [1, 3], + ]; + availableShapes.push(enumSubShape.windmill); // windmill looks good only in radial symmetry } else { const symmetries = [ - [[0, 3], [1, 2]], // vertical axis - [[0, 1], [2, 3]], // horizontal axis - [[0, 2], [1], [3]], // diagonal axis - [[1, 3], [0], [2]], // other diagonal axis - ] + [ + // horizontal axis + [0, 3], + [1, 2], + ], + [ + // vertical axis + [0, 1], + [2, 3], + ], + [ + // diagonal axis + [0, 2], + [1], + [3], + ], + [ + // other diagonal axis + [1, 3], + [0], + [2], + ], + ]; pickedSymmetry = randomChoice(symmetries); }