chore: code formatting
This commit is contained in:
@@ -1044,7 +1044,7 @@
|
|||||||
})
|
})
|
||||||
: null),
|
: null),
|
||||||
//Chess
|
//Chess
|
||||||
...(set.plugins.enabled.chess
|
...(set.plugins.enabled.chess
|
||||||
? ({
|
? ({
|
||||||
chess: {
|
chess: {
|
||||||
platform: options["chess.platform"] || "(chess platform)",
|
platform: options["chess.platform"] || "(chess platform)",
|
||||||
@@ -1056,14 +1056,19 @@
|
|||||||
WhiteElo: faker.datatype.number(3000),
|
WhiteElo: faker.datatype.number(3000),
|
||||||
BlackElo: faker.datatype.number(3000),
|
BlackElo: faker.datatype.number(3000),
|
||||||
},
|
},
|
||||||
animation: { size: 40, delay: 3, duration: 0.6 },
|
animation: {size: 40, delay: 3, duration: 0.6},
|
||||||
result: { white: faker.datatype.number(3), get black() { return this.white + faker.helpers.arrayElement([-1, +1]) } },
|
result: {
|
||||||
|
white: faker.datatype.number(3),
|
||||||
|
get black() {
|
||||||
|
return this.white + faker.helpers.arrayElement([-1, +1])
|
||||||
|
},
|
||||||
|
},
|
||||||
moves: [
|
moves: [
|
||||||
{color: "w", piece: "p", from: "f2", to: "f4", san: "f4", flags: "b"},
|
{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: "b", piece: "p", from: "c7", to: "c5", san: "c5", flags: "b"},
|
||||||
{color: "w", piece: "p", from: "e2", to: "e4", san: "e4", 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"},
|
{color: "b", piece: "p", from: "d7", to: "d6", san: "d6", flags: "n"},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
: null),
|
: null),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
|
|||||||
|
|
||||||
//Load inputs
|
//Load inputs
|
||||||
const {user, platform, animation} = imports.metadata.plugins.chess.inputs({data, account, q})
|
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])))
|
if (Number.isNaN(Number(animation[key])))
|
||||||
animation[key] = defaulted
|
animation[key] = defaulted
|
||||||
if (animation[key] < 0)
|
if (animation[key] < 0)
|
||||||
@@ -45,4 +45,4 @@ export default async function({login, q, imports, data, account}, {enabled = fal
|
|||||||
catch (error) {
|
catch (error) {
|
||||||
throw imports.format.error(error)
|
throw imports.format.error(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,11 +20,7 @@ Bxh6 9. Qxh6 Bb7 10. a3 e5 11. O-O-O Qe7 12. Kb1 a6 13. Nc1 O-O-O 14. Nb3 exd4
|
|||||||
d4 22. Nd5 Nbxd5 23. exd5 Qd6 24. Rxd4 cxd4 25. Re7+ Kb6 26. Qxd4+ Kxa5 27. b4+
|
d4 22. Nd5 Nbxd5 23. exd5 Qd6 24. Rxd4 cxd4 25. Re7+ Kb6 26. Qxd4+ Kxa5 27. b4+
|
||||||
Ka4 28. Qc3 Qxd5 29. Ra7 Bb7 30. Rxb7 Qc4 31. Qxf6 Kxa3 32. Qxa6+ Kxb4 33. c3+
|
Ka4 28. Qc3 Qxd5 29. Ra7 Bb7 30. Rxb7 Qc4 31. Qxf6 Kxa3 32. Qxa6+ Kxb4 33. c3+
|
||||||
Kxc3 34. Qa1+ Kd2 35. Qb2+ Kd1 36. Bf1 Rd2 37. Rd7 Rxd7 38. Bxc4 bxc4 39. Qxh8
|
Kxc3 34. Qa1+ Kd2 35. Qb2+ Kd1 36. Bf1 Rd2 37. Rd7 Rxd7 38. Bxc4 bxc4 39. Qxh8
|
||||||
Rd3 40. Qa8 c3 41. Qa4+ Ke1 42. f4 f5 43. Kc1 Rd2 44. Qa7 1-0`.trim()
|
Rd3 40. Qa8 c3 41. Qa4+ Ke1 42. f4 f5 43. Kc1 Rd2 44. Qa7 1-0`.trim(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user