mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
fixed lint errors
This commit is contained in:
parent
ecb8381c93
commit
75b56ee03b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user