chore: code formatting
This commit is contained in:
@@ -1044,7 +1044,7 @@
|
||||
})
|
||||
: null),
|
||||
//Chess
|
||||
...(set.plugins.enabled.chess
|
||||
...(set.plugins.enabled.chess
|
||||
? ({
|
||||
chess: {
|
||||
platform: options["chess.platform"] || "(chess platform)",
|
||||
@@ -1056,14 +1056,19 @@
|
||||
WhiteElo: faker.datatype.number(3000),
|
||||
BlackElo: faker.datatype.number(3000),
|
||||
},
|
||||
animation: { size: 40, delay: 3, duration: 0.6 },
|
||||
result: { white: faker.datatype.number(3), get black() { return this.white + faker.helpers.arrayElement([-1, +1]) } },
|
||||
animation: {size: 40, delay: 3, duration: 0.6},
|
||||
result: {
|
||||
white: faker.datatype.number(3),
|
||||
get black() {
|
||||
return this.white + faker.helpers.arrayElement([-1, +1])
|
||||
},
|
||||
},
|
||||
moves: [
|
||||
{color: "w", piece: "p", from: "f2", to: "f4", san: "f4", flags: "b"},
|
||||
{color: "b", piece: "p", from: "c7", to: "c5", san: "c5", flags: "b"},
|
||||
{color: "w", piece: "p", from: "e2", to: "e4", san: "e4", flags: "b"},
|
||||
{color: "b", piece: "p", from: "d7", to: "d6", san: "d6", flags: "n"},
|
||||
]
|
||||
],
|
||||
},
|
||||
})
|
||||
: null),
|
||||
|
||||
@@ -11,7 +11,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
|
||||
|
||||
//Load inputs
|
||||
const {user, platform, animation} = imports.metadata.plugins.chess.inputs({data, account, q})
|
||||
for (const [key, defaulted] of Object.entries({size:40, delay:1, duration:4})) {
|
||||
for (const [key, defaulted] of Object.entries({size: 40, delay: 1, duration: 4})) {
|
||||
if (Number.isNaN(Number(animation[key])))
|
||||
animation[key] = defaulted
|
||||
if (animation[key] < 0)
|
||||
@@ -45,4 +45,4 @@ export default async function({login, q, imports, data, account}, {enabled = fal
|
||||
catch (error) {
|
||||
throw imports.format.error(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user