chesspal 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/README.md +45 -82
  2. package/dist/cli/chat-hook.js +1 -1
  3. package/dist/cli/command-line.d.ts +1 -2
  4. package/dist/cli/command-line.js +2 -3
  5. package/dist/commands/agents.d.ts +26 -0
  6. package/dist/commands/agents.js +72 -0
  7. package/dist/commands/ai-move.d.ts +5 -14
  8. package/dist/commands/ai-move.js +28 -35
  9. package/dist/commands/ai-say.d.ts +3 -1
  10. package/dist/commands/ai-say.js +24 -6
  11. package/dist/commands/analyse-game.d.ts +4 -0
  12. package/dist/commands/analyse-game.js +43 -16
  13. package/dist/commands/annotate-game.d.ts +4 -0
  14. package/dist/commands/annotate-game.js +65 -12
  15. package/dist/commands/answer-lines.d.ts +28 -0
  16. package/dist/commands/answer-lines.js +144 -0
  17. package/dist/commands/coach.d.ts +45 -0
  18. package/dist/commands/coach.js +344 -0
  19. package/dist/commands/context.d.ts +16 -5
  20. package/dist/commands/context.js +1 -0
  21. package/dist/commands/delete-game.d.ts +7 -0
  22. package/dist/commands/delete-game.js +30 -0
  23. package/dist/commands/delete-review.d.ts +8 -0
  24. package/dist/commands/delete-review.js +34 -0
  25. package/dist/commands/drawings.d.ts +0 -2
  26. package/dist/commands/drawings.js +5 -3
  27. package/dist/commands/end-game.js +5 -2
  28. package/dist/commands/export-game.d.ts +1 -1
  29. package/dist/commands/export-game.js +4 -3
  30. package/dist/commands/game-summary.d.ts +21 -38
  31. package/dist/commands/game-summary.js +30 -167
  32. package/dist/commands/index.d.ts +15 -0
  33. package/dist/commands/index.js +47 -2
  34. package/dist/commands/init.d.ts +3 -3
  35. package/dist/commands/init.js +4 -4
  36. package/dist/commands/lead-input.d.ts +8 -0
  37. package/dist/commands/lead-input.js +21 -0
  38. package/dist/commands/look.js +4 -1
  39. package/dist/commands/new-game.d.ts +2 -3
  40. package/dist/commands/new-game.js +7 -4
  41. package/dist/commands/play-move.d.ts +8 -15
  42. package/dist/commands/play-move.js +5 -13
  43. package/dist/commands/player-move.d.ts +2 -6
  44. package/dist/commands/player-move.js +13 -6
  45. package/dist/commands/player-say.d.ts +1 -1
  46. package/dist/commands/player-say.js +1 -1
  47. package/dist/commands/ponder.d.ts +10 -0
  48. package/dist/commands/ponder.js +33 -21
  49. package/dist/commands/position.d.ts +1 -1
  50. package/dist/commands/position.js +3 -1
  51. package/dist/commands/profiles.d.ts +13 -4
  52. package/dist/commands/profiles.js +49 -15
  53. package/dist/commands/registry.d.ts +8 -3
  54. package/dist/commands/registry.js +12 -11
  55. package/dist/commands/say.d.ts +1 -1
  56. package/dist/commands/say.js +16 -16
  57. package/dist/commands/speech.d.ts +8 -0
  58. package/dist/commands/speech.js +20 -0
  59. package/dist/commands/status.d.ts +9 -3
  60. package/dist/commands/status.js +40 -15
  61. package/dist/commands/study-games.js +1 -1
  62. package/dist/commands/study.js +3 -19
  63. package/dist/core/facts.js +15 -15
  64. package/dist/core/game.d.ts +3 -1
  65. package/dist/core/game.js +8 -4
  66. package/dist/core/illegal.js +1 -1
  67. package/dist/core/index.d.ts +5 -4
  68. package/dist/core/index.js +5 -4
  69. package/dist/core/lead.d.ts +15 -0
  70. package/dist/core/lead.js +40 -0
  71. package/dist/core/levels.d.ts +1 -1
  72. package/dist/core/levels.js +1 -1
  73. package/dist/core/moods.d.ts +0 -2
  74. package/dist/core/moods.js +2 -2
  75. package/dist/core/openings.d.ts +0 -2
  76. package/dist/core/openings.js +1 -1
  77. package/dist/core/profile.js +1 -1
  78. package/dist/core/record.d.ts +1 -1
  79. package/dist/core/record.js +1 -1
  80. package/dist/core/review.d.ts +18 -3
  81. package/dist/core/review.js +52 -9
  82. package/dist/games/ai-model.d.ts +4 -0
  83. package/dist/games/ai-model.js +9 -0
  84. package/dist/games/analysis.d.ts +1 -1
  85. package/dist/games/archive.d.ts +25 -4
  86. package/dist/games/archive.js +99 -25
  87. package/dist/games/coach.d.ts +57 -0
  88. package/dist/games/coach.js +144 -0
  89. package/dist/games/current-game.d.ts +2 -0
  90. package/dist/games/current-game.js +7 -1
  91. package/dist/games/files.js +1 -0
  92. package/dist/games/index.d.ts +5 -4
  93. package/dist/games/index.js +5 -4
  94. package/dist/games/talk.d.ts +1 -5
  95. package/dist/games/talk.js +14 -14
  96. package/dist/home/open-folder.js +1 -1
  97. package/dist/host-files/{ponder-agents.d.ts → agents.d.ts} +10 -2
  98. package/dist/host-files/agents.js +53 -0
  99. package/dist/host-files/host-files.d.ts +7 -2
  100. package/dist/host-files/host-files.js +27 -12
  101. package/dist/host-files/index.d.ts +2 -2
  102. package/dist/host-files/index.js +3 -3
  103. package/dist/index.d.ts +1 -3
  104. package/dist/index.js +1 -0
  105. package/dist/page/app/anchor.js +88 -0
  106. package/dist/page/{app.js → app/app.js} +116 -231
  107. package/dist/page/app/keys.js +94 -0
  108. package/dist/page/app/phase.js +30 -0
  109. package/dist/page/app/served.js +73 -0
  110. package/dist/page/avatars/avatars.js +19 -0
  111. package/dist/page/avatars/thought.js +10 -0
  112. package/dist/page/base.css +160 -0
  113. package/dist/page/board/board.css +959 -0
  114. package/dist/page/board/board.js +125 -0
  115. package/dist/page/{explain.js → board/explain.js} +1 -1
  116. package/dist/page/board/marks.js +160 -0
  117. package/dist/page/board/motion.js +71 -0
  118. package/dist/page/board/pointer.js +239 -0
  119. package/dist/page/board/squares.js +26 -0
  120. package/dist/page/dialogs/analyses.js +195 -0
  121. package/dist/page/{dialog.js → dialogs/dialog.js} +1 -1
  122. package/dist/page/dialogs/dialogs.css +1228 -0
  123. package/dist/page/{new-game-dialog.js → dialogs/new-game.js} +3 -3
  124. package/dist/page/{profile-dialogs.js → dialogs/profiles.js} +40 -11
  125. package/dist/page/dialogs/search.js +31 -0
  126. package/dist/page/dialogs/settings.js +42 -0
  127. package/dist/page/dialogs/studied.js +39 -0
  128. package/dist/page/dialogs/study.js +51 -0
  129. package/dist/page/{badges.js → game/badges.js} +1 -1
  130. package/dist/page/{browse.js → game/browse.js} +1 -1
  131. package/dist/page/game/card-fold.js +40 -0
  132. package/dist/page/game/column.js +55 -0
  133. package/dist/page/{ending.js → game/ending.js} +2 -2
  134. package/dist/page/game/game.css +577 -0
  135. package/dist/page/{move-list.js → game/move-list.js} +10 -6
  136. package/dist/page/{plies.js → game/plies.js} +30 -10
  137. package/dist/page/game/result-tile.js +14 -0
  138. package/dist/page/helps/helps.css +689 -0
  139. package/dist/page/helps/helps.js +220 -0
  140. package/dist/page/helps/view.js +127 -0
  141. package/dist/page/layout/fold-tab.js +11 -0
  142. package/dist/page/{folds.js → layout/folds.js} +1 -1
  143. package/dist/page/{header.js → layout/header.js} +5 -4
  144. package/dist/page/layout/layout.css +834 -0
  145. package/dist/page/lead/lead.js +82 -0
  146. package/dist/page/lead/view.js +38 -0
  147. package/dist/page/main.js +2 -2
  148. package/dist/page/pieces/CREDITS.md +12 -29
  149. package/dist/page/pieces/capablanca-small.svg +20 -0
  150. package/dist/page/pieces/capablanca.svg +22 -0
  151. package/dist/page/pieces/nitida-small.svg +3 -2
  152. package/dist/page/pieces/nitida.svg +3 -2
  153. package/dist/page/{pieces.js → pieces/pieces.js} +2 -2
  154. package/dist/page/pieces/torretta-small.svg +15 -14
  155. package/dist/page/pieces/torretta.svg +17 -15
  156. package/dist/page/{player-card.js → players/card.js} +2 -6
  157. package/dist/page/{clock-time.js → players/clock-time.js} +2 -2
  158. package/dist/page/{profile.js → profile/profile.js} +9 -5
  159. package/dist/page/{settings.js → profile/settings.js} +5 -4
  160. package/dist/page/style.css +9 -4398
  161. package/dist/page/talk/talk.css +958 -0
  162. package/dist/page/{talk.js → talk/talk.js} +39 -46
  163. package/dist/page/text.js +137 -19
  164. package/dist/page/theme.css +292 -0
  165. package/dist/profiles/index.d.ts +1 -1
  166. package/dist/profiles/profiles.d.ts +15 -4
  167. package/dist/profiles/profiles.js +24 -7
  168. package/dist/server/bell.d.ts +10 -2
  169. package/dist/server/bell.js +28 -12
  170. package/dist/server/caller.d.ts +14 -3
  171. package/dist/server/caller.js +44 -11
  172. package/dist/server/mcp.d.ts +2 -3
  173. package/dist/server/mcp.js +53 -19
  174. package/dist/server/page/analyses.d.ts +23 -0
  175. package/dist/server/page/analyses.js +65 -0
  176. package/dist/server/page/files.d.ts +5 -0
  177. package/dist/server/page/files.js +92 -0
  178. package/dist/server/page/game.d.ts +6 -0
  179. package/dist/server/page/game.js +381 -0
  180. package/dist/server/{http.d.ts → page/http.d.ts} +13 -0
  181. package/dist/server/{http.js → page/http.js} +11 -0
  182. package/dist/server/{page.d.ts → page/page.d.ts} +8 -13
  183. package/dist/server/page/page.js +229 -0
  184. package/dist/server/{profile-routes.d.ts → page/profiles.d.ts} +2 -2
  185. package/dist/server/{profile-routes.js → page/profiles.js} +47 -18
  186. package/instructions/analysis.md +4 -0
  187. package/instructions/analyst-agent.md +8 -0
  188. package/instructions/analyst.md +3 -7
  189. package/instructions/coach.md +11 -0
  190. package/instructions/opponent.md +4 -4
  191. package/package.json +1 -1
  192. package/dist/host-files/ponder-agents.js +0 -40
  193. package/dist/page/avatars.js +0 -16
  194. package/dist/page/board.js +0 -566
  195. package/dist/page/fold-tab.js +0 -9
  196. package/dist/page/game-column.js +0 -44
  197. package/dist/page/helps-view.js +0 -51
  198. package/dist/page/helps.js +0 -90
  199. package/dist/page/pieces/cburnett-small.svg +0 -20
  200. package/dist/page/pieces/cburnett.svg +0 -20
  201. package/dist/page/settings-panel.js +0 -32
  202. package/dist/page/studied.js +0 -14
  203. package/dist/page/study-dialog.js +0 -58
  204. package/dist/server/analyses.d.ts +0 -17
  205. package/dist/server/analyses.js +0 -46
  206. package/dist/server/page.js +0 -657
  207. /package/dist/page/{torretta.js → avatars/torretta.js} +0 -0
  208. /package/dist/page/{opening-book.js → game/opening-book.js} +0 -0
  209. /package/dist/page/{model-name.js → players/model-name.js} +0 -0
  210. /package/dist/page/{sounds.js → sounds/sounds.js} +0 -0
  211. /package/dist/page/{voice.js → talk/voice.js} +0 -0
@@ -1,51 +0,0 @@
1
- /** The helps of a game's position, whatever the AI's level (D-79). */
2
- export function helpsOf(game) {
3
- const facts = game.facts;
4
- const pieces = new Map(facts.pieces.map((piece) => [piece.square, piece]));
5
- const on = (square) => pieces.get(square);
6
- const atRisk = (squares, why) => squares.map((square) => ({ piece: on(square), why }));
7
- return {
8
- toMove: game.position.turn,
9
- atRisk: [...atRisk(facts.undefended, "undefended"), ...atRisk(facts.attackedByCheaper, "cheaper"), ...atRisk(facts.outnumbered, "outnumbered")],
10
- pins: facts.pins.map((pin) => ({ piece: on(pin.square), by: on(pin.by), to: on(pin.to) })),
11
- checks: facts.checks,
12
- otherChecks: facts.otherChecks ?? [],
13
- loose: facts.loose.map(on),
14
- strategy: game.profile,
15
- };
16
- }
17
- /** Whether the helps mark a square's piece as at risk. */
18
- export function atRiskOn(helps, square) {
19
- return helps.atRisk.some((risk) => risk.piece.square === square);
20
- }
21
- /** The strategy's table: only the lines where a side has something; the pawn islands only when a side has more than one. */
22
- export function strategyOf(profile) {
23
- const lines = Object.entries(cells).map(([row, cell]) => ({ row: row, white: cell(profile.white), black: cell(profile.black) }));
24
- const split = profile.white.pawns.islands.length > 1 || profile.black.pawns.islands.length > 1;
25
- return lines.filter((line) => line.row === "islands" ? split : something(line.white) || something(line.black));
26
- }
27
- const cells = {
28
- isolated: (side) => side.pawns.isolated,
29
- doubled: (side) => side.pawns.doubled,
30
- backward: (side) => side.pawns.backward,
31
- passed: (side) => side.pawns.passed,
32
- islands: (side) => side.pawns.islands,
33
- halfOpen: (side) => side.halfOpenFiles,
34
- heavyOnFiles: (side) => side.heavyOnFiles,
35
- onSeventh: (side) => side.onSeventh,
36
- outposts: (side) => side.outposts.map((outpost) => outpost.square),
37
- bishopPair: (side) => side.bishopPair,
38
- space: (side) => side.space,
39
- undeveloped: (side) => side.undeveloped,
40
- castled: castlingOf,
41
- kingAttacks: (side) => side.king?.attacksNear ?? 0,
42
- };
43
- function castlingOf(side) {
44
- if (side.castled === "O-O" || side.castled === "O-O-O") {
45
- return side.castled;
46
- }
47
- return side.castlingRights.length > 0 ? "not-yet" : side.castled === "no" ? "no-more" : "unknown";
48
- }
49
- function something(cell) {
50
- return typeof cell === "object" ? cell.length > 0 : typeof cell === "number" ? cell > 0 : typeof cell === "boolean" ? cell : cell !== "unknown";
51
- }
@@ -1,90 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
2
- // The helps on the page (D-78, Zoe's sketch B): the board says where, the card says what, the facts the AI sees at the game's level and only those.
3
- import { Fragment } from "preact";
4
- import { useState } from "preact/hooks";
5
- import { strategyOf } from "./helps-view.js";
6
- import { Figurines } from "./move-list.js";
7
- import { Figurine } from "./pieces.js";
8
- /** The corner folded in ink on a piece at risk: on the board, and before its line in the card. */
9
- export function Notch() {
10
- return (_jsx("span", { class: "help-notch", "aria-hidden": "true", children: _jsxs("svg", { viewBox: "0 0 10 10", children: [_jsx("path", { d: "M0.5 0.5V9.5H9.5Z" }), _jsx("circle", { cx: "2.9", cy: "7.1", r: "1.1" })] }) }));
11
- }
12
- /**
13
- * The helps' card, between the opening and the moves: the tactics in lines, the strategy in a table and the control map, seen while its button
14
- * or M is held. A line under the pointer lights its squares on the board.
15
- */
16
- export function HelpsCard({ helps, onPoint, onMap, mapping, text }) {
17
- const [tab, setTab] = useState("tactics");
18
- const words = text.helpsCard;
19
- return (_jsxs("section", { class: "card helps-card", "aria-label": words.title, children: [_jsx("h3", { class: "helps-title", children: words.title }), _jsxs("div", { class: "tabs", role: "tablist", children: [_jsx("button", { type: "button", role: "tab", "aria-selected": tab === "tactics", onClick: () => setTab("tactics"), children: words.tactics }), _jsx("button", { type: "button", role: "tab", "aria-selected": tab === "strategy", onClick: () => setTab("strategy"), children: words.strategy }), _jsx(MapButton, { mapping: mapping, onMap: onMap, held: true, text: text })] }), tab === "tactics" ? _jsx(Tactics, { helps: helps, onPoint: onPoint, text: text }) : _jsx(Strategy, { profile: helps.strategy, text: text })] }));
20
- }
21
- /**
22
- * The map's button (D-78): the mouse holds it to see the map; a finger, or the keyboard, turns it on and off. In the card's tabs it says it is held; on a
23
- * phone it sits under the board.
24
- */
25
- export function MapButton({ mapping, onMap, held, text }) {
26
- // A click carries its pointer's type: none from the keyboard.
27
- const mouse = (event) => event instanceof PointerEvent && event.pointerType === "mouse";
28
- return (_jsxs("button", { type: "button", class: "map-button", "aria-pressed": mapping, title: text.helpsCard.mapHint, onPointerDown: (event) => mouse(event) && onMap(true), onPointerUp: (event) => mouse(event) && onMap(false), onPointerLeave: (event) => mouse(event) && onMap(false), onClick: (event) => !mouse(event) && onMap(!mapping), children: [_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("path", { d: "M2 2h5v5H2zM9 9h5v5H9z" }), _jsx("path", { d: "M9 2h5v5H9zM2 9h5v5H2z", opacity: ".35" })] }), text.helpsCard.map, held ? _jsxs("small", { children: ["(", text.helpsCard.hold, ")"] }) : null] }));
29
- }
30
- function Tactics({ helps, onPoint, text }) {
31
- const words = text.helpsCard;
32
- // A row lights its squares while the pointer is on it; a touch keeps them lit until the position changes, as a square in the AI's words (T-111).
33
- const point = (squares) => ({
34
- onPointerEnter: () => onPoint(squares),
35
- onPointerLeave: (event) => event.pointerType === "mouse" && onPoint([]),
36
- });
37
- const other = helps.toMove === "white" ? "black" : "white";
38
- const loose = helps.loose.map((piece) => piece.square);
39
- return (_jsxs("ul", { class: "help-rows", children: [helps.atRisk.map(({ piece, why }) => (_jsxs("li", { class: "points", ...point([piece.square, ...piece.attackers]), children: [_jsx(Notch, {}), text.piece(piece.piece, piece.side), " ", _jsx(Squares, { squares: [piece.square] }), " \u00B7 ", words.attackers, ": ", _jsx(Squares, { squares: piece.attackers }), why === "undefended" ? null : (_jsxs(_Fragment, { children: [" ", "\u00B7 ", words.defenders, ": ", _jsx(Squares, { squares: piece.defenders })] })), " \u00B7 ", words[why]] }, `risk ${piece.square}`))), helps.pins.map(({ piece, by, to }) => (_jsxs("li", { class: "points", ...point([piece.square, by.square, to.square]), children: [_jsx("span", { class: "row-icon", "aria-hidden": "true", children: "\u26D3" }), text.piece(piece.piece, piece.side), " ", _jsx(Squares, { squares: [piece.square] }), " ", words.pinnedTo(to.piece), " ", _jsx(Squares, { squares: [to.square] }), ", ", words.pinnedBy(by.piece), " ", _jsx(Squares, { squares: [by.square] })] }, `pin ${piece.square}`))), helps.atRisk.length === 0 && helps.pins.length === 0 ? _jsx("li", { class: "quiet", children: words.nothingAtRisk }) : null, helps.checks.length === 0 ? null : _jsx(Checks, { name: words.checks(helps.toMove, true), checks: helps.checks, side: helps.toMove }), helps.otherChecks.length === 0 ? null : _jsx(Checks, { name: words.checks(other, false), checks: helps.otherChecks, side: other }), loose.length === 0 ? null : (_jsxs("li", { class: "points quiet", ...point(loose), children: [words.loose, ": ", _jsx(Pieces, { pieces: helps.loose.filter((piece) => piece.side === "white") }), _jsx(Pieces, { pieces: helps.loose.filter((piece) => piece.side === "black") })] }, "loose"))] }));
40
- }
41
- /** A side's checks in SAN, drawn with the move list's figures (D-50). */
42
- function Checks({ name, checks, side }) {
43
- return (_jsxs("li", { children: [_jsx("span", { class: "row-icon", "aria-hidden": "true", children: "+" }), name, ": ", checks.map((check) => (_jsx("span", { class: "help-move", children: _jsx(Figurines, { san: check, side: side }) }, check)))] }));
44
- }
45
- /** Pieces of one side, each its figure and its square. */
46
- function Pieces({ pieces }) {
47
- return pieces.length === 0 ? null : (_jsx("span", { class: "help-pieces", children: pieces.map((piece) => (_jsxs("span", { class: "help-move", children: [_jsx(Figurine, { letter: piece.piece, side: piece.side }), _jsx("b", { class: "square-name", children: piece.square })] }, piece.square))) }));
48
- }
49
- function Squares({ squares }) {
50
- return _jsx("b", { class: "square-name", children: squares.join(", ") });
51
- }
52
- function Strategy({ profile, text }) {
53
- const words = text.helpsCard;
54
- const files = profile.openFiles.length === 0 ? "–" : profile.openFiles.join(", ");
55
- const { draw, pawnEnding } = profile;
56
- // A name's meaning shows under its line at a click or a tap, since a phone has no pointer for the title (Rosa, T-117).
57
- const [explained, setExplained] = useState(undefined);
58
- const notes = [
59
- words.openFiles(files),
60
- words.controlled(profile.controlled.white, profile.controlled.black, profile.controlled.contested),
61
- words.phases[profile.phase],
62
- profile.oppositeBishops ? words.oppositeBishops : undefined,
63
- draw.repetitions > 1 ? words.repetitions(draw.repetitions) : undefined,
64
- draw.fiftyMovesLeft <= fiftyMovesShown ? words.fiftyMoves(draw.fiftyMovesLeft) : undefined,
65
- draw.insufficient ? words.insufficient : undefined,
66
- ...(pawnEnding?.squares ?? []).map((square) => words.pawnSquare(square.pawn, square.caught)),
67
- pawnEnding?.opposition === undefined ? undefined : words.opposition(pawnEnding.opposition),
68
- ];
69
- return (_jsxs("div", { class: "strategy", children: [_jsxs("table", { class: "profile-table", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", {}), _jsx("th", { children: words.white }), _jsx("th", { children: words.black })] }) }), _jsx("tbody", { children: strategyOf(profile).map((line) => {
70
- const [name, meaning] = words.rows[line.row];
71
- const open = explained === line.row;
72
- return (_jsxs(Fragment, { children: [_jsxs("tr", { children: [_jsx("th", { children: _jsx("button", { type: "button", class: "term", title: meaning, "aria-expanded": open, onClick: () => setExplained(open ? undefined : line.row), children: name }) }), _jsx("td", { children: cellText(line.white, words) }), _jsx("td", { children: cellText(line.black, words) })] }), open
73
- ? (_jsx("tr", { class: "meaning", children: _jsx("td", { colSpan: 3, children: meaning }) }))
74
- : null] }, line.row));
75
- }) })] }), _jsx("p", { class: "profile-foot", children: notes.filter((note) => note !== undefined).join(" · ") })] }));
76
- }
77
- // The fifty-move count shows only when the draw is near: ten moves each, or less.
78
- const fiftyMovesShown = 20;
79
- function cellText(cell, words) {
80
- if (typeof cell === "object") {
81
- return cell.length === 0 ? "–" : cell.join(", ");
82
- }
83
- if (typeof cell === "number") {
84
- return String(cell);
85
- }
86
- if (typeof cell === "boolean") {
87
- return cell ? words.yes : "–";
88
- }
89
- return cell === "not-yet" ? words.notYet : cell === "no-more" ? words.noMore : cell === "unknown" ? "–" : cell;
90
- }
@@ -1,20 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 200" width="600" height="200">
2
- <!-- Chesspal, the small pieces of the set "cburnett" (T-94): simplified from the pieces of Colin M.L. Burnett, under the licence BSD 3-Clause
3
- (see CREDITS.md). Copyright (c) Colin M.L. Burnett. All rights reserved. The original's notice: Chesspal, the piece set "cburnett" by Colin M.L. Burnett, under the licence BSD 3-Clause (one of the licences the author offers: GFDL, CC BY-SA 3.0, BSD, GPL). Source: https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces (Chess_klt45.svg and the others) Changed for Chesspal (D-52): the twelve pieces gathered in one file as symbols wK to bP, their styles written on the elements, their ids prefixed.
4
- Changed for Chesspal by Zoe Whitaker: each piece reduced to one solid silhouette, without inner lines, for the pieces taken and the moves. -->
5
- <defs>
6
- <symbol id="wK" viewBox="0 0 100 100"><path fill="#ffffff" stroke="#000000" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 48.88 14.07 C 47.67 14.62 47.27 15.31 47.27 16.89 C 47.27 17.63 47.22 18.04 47.12 18.12 C 47.03 18.2 46.18 18.27 45.21 18.29 C 43.49 18.33 43.44 18.34 42.92 18.71 C 41.51 19.68 41.3 21.73 42.48 22.96 C 43.17 23.68 43.45 23.77 45.29 23.83 C 46.21 23.85 47.03 23.93 47.12 24 C 47.29 24.14 47.34 27.15 47.18 27.39 C 47.13 27.47 46.67 27.75 46.16 28.01 C 45.02 28.61 43.13 30.38 42.2 31.72 C 40.89 33.62 40.14 35.58 40 37.46 C 39.95 38.11 39.87 38.52 39.77 38.56 C 39.69 38.59 39.21 38.41 38.72 38.16 C 31.35 34.45 22.62 35.03 16.99 39.61 C 12.32 43.41 10.18 48.02 10.69 53.22 C 11.1 57.41 12.94 60.8 17.02 64.88 C 19.25 67.11 20.52 68.14 23.11 69.86 C 24.03 70.47 24.88 71.06 25 71.16 C 25.2 71.34 25.21 71.85 25.21 78.53 C 25.21 86.57 25.17 86.19 26.13 87.02 C 27.43 88.17 31.88 90.26 35.38 91.37 C 42.19 93.53 51.23 94.06 58.88 92.75 C 64.26 91.83 71.41 89.11 73.81 87.07 C 74.83 86.2 74.79 86.62 74.79 78.52 L 74.79 71.34 75.13 71.07 C 75.31 70.92 76.11 70.38 76.89 69.86 C 79.37 68.23 80.73 67.11 82.91 64.94 C 87.07 60.78 88.89 57.44 89.31 53.22 C 89.81 48.04 87.76 43.57 83.09 39.68 C 77.64 35.15 69.15 34.45 61.78 37.93 C 61 38.3 60.29 38.58 60.2 38.54 C 60.1 38.5 60.04 38.26 60.04 37.87 C 60.04 36.28 59.4 34.35 58.22 32.35 C 57.35 30.89 55.09 28.65 53.84 28 C 53.33 27.74 52.87 27.47 52.82 27.39 C 52.66 27.15 52.71 24.14 52.88 24 C 52.97 23.93 53.79 23.85 54.71 23.83 C 56.55 23.77 56.83 23.68 57.52 22.96 C 58.7 21.73 58.49 19.68 57.08 18.71 C 56.56 18.34 56.51 18.33 54.79 18.29 C 53.82 18.27 52.97 18.2 52.88 18.12 C 52.78 18.04 52.73 17.63 52.73 16.89 C 52.73 15.7 52.54 15.13 51.96 14.59 C 51.51 14.17 50.61 13.82 50 13.82 C 49.69 13.82 49.19 13.93 48.88 14.07"/></symbol>
7
- <symbol id="wQ" viewBox="0 0 100 100"><path fill="#ffffff" stroke="#000000" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 48.88 14.76 C 46.24 15.1 43.63 17.49 43 20.16 C 42.32 23.05 43.55 26.3 45.91 27.83 C 46.24 28.05 46.55 28.3 46.58 28.4 C 46.64 28.54 42.98 46.6 42.74 47.43 C 42.7 47.55 42.6 47.65 42.52 47.65 C 42.41 47.65 37.26 34.47 35.66 30.08 C 35.63 30 36 29.51 36.49 28.99 C 41.97 23.2 35.24 14.15 28.07 17.67 C 22.82 20.25 22.76 27.82 27.97 30.48 C 28.67 30.84 28.96 31.06 29.01 31.27 C 29.13 31.72 28.72 49.52 28.59 49.65 C 28.53 49.71 28.4 49.67 28.29 49.54 C 28.03 49.25 19.4 36.01 19.23 35.66 C 19.13 35.44 19.17 35.32 19.44 34.99 C 20.97 33.18 21.27 29.96 20.13 27.58 C 17.97 23.07 12 22.11 8.48 25.72 C 6.3 27.95 5.84 31.33 7.32 34.15 C 8.24 35.89 10.18 37.33 12.22 37.78 C 12.46 37.83 12.59 37.97 12.68 38.26 C 12.84 38.77 17.47 62.15 17.65 63.38 C 17.91 65.14 18.62 66.31 20.68 68.39 C 21.46 69.17 22.33 70.19 22.63 70.65 C 22.93 71.11 23.52 72.02 23.95 72.67 C 24.72 73.83 24.74 73.87 24.67 74.51 C 24.5 75.99 24.35 76.38 23.65 77.18 C 22.43 78.58 21.74 80.25 21.74 81.83 C 21.74 82.51 21.69 82.72 21.37 83.22 C 19.84 85.6 20.16 88.55 22.16 90.58 C 23.05 91.49 23.49 91.74 24.45 91.89 C 35.42 93.65 55.36 94.01 68.96 92.69 C 75.92 92.02 76.75 91.82 77.95 90.49 C 79.86 88.38 80.13 85.55 78.63 83.22 C 78.31 82.72 78.26 82.51 78.26 81.83 C 78.26 80.25 77.57 78.58 76.35 77.18 C 75.65 76.38 75.48 75.93 75.32 74.47 C 75.26 73.89 75.29 73.8 75.81 73.05 C 76.11 72.61 76.68 71.74 77.06 71.12 C 77.55 70.33 78.21 69.53 79.26 68.46 C 81.42 66.26 82.09 65.15 82.35 63.38 C 82.53 62.15 87.16 38.77 87.32 38.26 C 87.41 37.97 87.54 37.83 87.78 37.78 C 90.53 37.17 92.84 34.92 93.38 32.3 C 93.6 31.27 93.48 29.15 93.15 28.25 C 91.35 23.32 85 21.91 81.28 25.63 C 78.86 28.05 78.45 31.92 80.33 34.67 C 80.57 35.02 80.77 35.41 80.76 35.53 C 80.75 35.72 72.68 48.24 71.84 49.36 C 71.65 49.62 71.49 49.73 71.42 49.65 C 71.28 49.52 70.87 31.74 70.99 31.27 C 71.04 31.06 71.33 30.84 72.03 30.48 C 76.34 28.28 77.25 22.45 73.82 19.04 C 70.96 16.19 66.49 16.18 63.65 19.03 C 60.84 21.84 60.8 26.24 63.57 29.1 C 64.02 29.57 64.37 30.02 64.34 30.09 C 62.84 34.22 57.59 47.65 57.48 47.65 C 57.27 47.65 57.43 48.32 55.26 37.85 L 53.33 28.5 53.86 28.06 C 56.66 25.8 57.71 23.16 57 20.16 C 56.47 17.92 54.54 15.83 52.29 15.05 C 51.58 14.81 49.74 14.65 48.88 14.76"/></symbol>
8
- <symbol id="wR" viewBox="0 0 100 100"><path fill="#ffffff" stroke="#000000" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 23.54 22.04 C 23.04 22.27 22.29 23.07 22.06 23.63 C 21.77 24.33 21.77 36.19 22.07 36.78 C 22.18 36.99 23.68 38.6 25.41 40.34 L 28.56 43.5 28.56 56.12 C 28.56 67.53 28.54 68.76 28.36 69.12 C 28.25 69.34 27.77 70.17 27.3 70.96 C 26.52 72.27 26.39 72.42 25.84 72.68 C 25.5 72.84 25.06 73.14 24.86 73.35 C 24.14 74.09 24.1 74.34 24.1 77.86 C 24.1 80.18 24.06 81.1 23.95 81.21 C 23.85 81.31 23.16 81.35 21.65 81.35 C 19.02 81.35 18.43 81.58 17.77 82.87 C 17.43 83.52 17.4 91.28 17.73 91.93 C 18.01 92.48 18.51 92.99 19.04 93.26 C 19.76 93.63 80.24 93.63 80.96 93.26 C 81.49 92.99 81.99 92.48 82.27 91.93 C 82.6 91.28 82.57 83.52 82.23 82.87 C 81.57 81.58 80.98 81.35 78.35 81.35 C 76.84 81.35 76.15 81.31 76.05 81.21 C 75.94 81.1 75.9 80.18 75.9 77.86 C 75.9 74.34 75.86 74.09 75.14 73.35 C 74.94 73.14 74.5 72.84 74.16 72.68 C 73.61 72.42 73.48 72.27 72.7 70.96 C 72.23 70.17 71.75 69.34 71.64 69.12 C 71.46 68.76 71.44 67.53 71.44 56.12 L 71.44 43.5 74.59 40.34 C 76.32 38.6 77.82 36.99 77.93 36.78 C 78.26 36.13 78.23 24.25 77.9 23.54 C 77.6 22.89 76.66 22.03 76.13 21.93 C 75.9 21.89 73.43 21.87 70.63 21.89 L 65.53 21.93 65.02 22.27 C 64.11 22.87 63.83 23.46 63.78 24.83 C 63.75 25.49 63.68 26.09 63.61 26.17 C 63.43 26.39 58.67 26.4 58.45 26.18 C 58.36 26.09 58.3 25.64 58.3 25.03 C 58.3 23.85 58.07 23.27 57.36 22.59 C 56.59 21.86 56.71 21.87 50 21.87 C 43.29 21.87 43.41 21.86 42.64 22.59 C 41.93 23.27 41.7 23.85 41.7 25.03 C 41.7 25.64 41.64 26.09 41.55 26.18 C 41.33 26.4 36.57 26.39 36.39 26.17 C 36.32 26.09 36.25 25.49 36.22 24.83 C 36.17 23.46 35.89 22.87 34.98 22.27 L 34.47 21.93 29.19 21.9 C 24.95 21.88 23.84 21.91 23.54 22.04"/></symbol>
9
- <symbol id="wB" viewBox="0 0 100 100"><path fill="#ffffff" stroke="#000000" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 47.94 14.8 C 44.97 15.58 42.49 18.14 41.88 21.06 C 41.41 23.31 41.88 25.71 43.18 27.65 C 43.5 28.13 43.6 28.03 41.51 29.27 C 33.26 34.18 28.18 41.7 27.85 49.5 C 27.64 54.58 29.01 58.36 32.25 61.63 C 33.08 62.48 33.76 63.21 33.76 63.27 C 33.76 63.33 33.48 63.74 33.14 64.2 C 31.99 65.71 30.79 68.56 30.79 69.76 C 30.79 69.98 30.68 70.48 30.55 70.86 C 30.06 72.3 30.11 74.37 30.68 76.23 C 31.09 77.56 32.24 78.62 34.54 79.8 C 35.22 80.15 35.77 80.49 35.76 80.55 C 35.75 80.72 33.76 80.83 30.48 80.85 C 25.35 80.88 21.76 81.19 19.67 81.8 C 17.4 82.46 14.37 84.32 12.35 86.3 C 11.04 87.58 10.76 88.14 10.88 89.25 C 11.05 90.9 13.21 92.87 15.41 93.38 C 16.46 93.62 18.72 93.47 20.01 93.07 C 23.2 92.09 24.79 91.98 34.07 92.08 C 43.14 92.19 45.97 92.01 49.1 91.14 L 50 90.88 50.9 91.14 C 54.03 92.01 56.75 92.19 65.86 92.08 C 75.22 91.98 76.8 92.09 79.99 93.07 C 81.28 93.47 83.54 93.62 84.59 93.38 C 86.79 92.87 88.95 90.9 89.12 89.25 C 89.24 88.14 88.96 87.58 87.65 86.3 C 84.69 83.4 81.19 81.67 77.39 81.24 C 76.74 81.17 75.96 81.08 75.65 81.04 C 75.35 81.01 72.67 80.92 69.71 80.86 C 66.65 80.79 64.28 80.69 64.21 80.62 C 64.14 80.55 64.52 80.29 65.26 79.92 C 67.68 78.7 68.9 77.6 69.32 76.22 C 69.89 74.39 69.94 72.27 69.45 70.85 C 69.32 70.47 69.21 70.01 69.21 69.83 C 69.21 68.6 68.01 65.71 66.87 64.21 C 66.52 63.75 66.24 63.33 66.24 63.27 C 66.24 63.21 66.92 62.48 67.75 61.63 C 69.84 59.53 70.94 57.62 71.62 54.93 C 72.74 50.52 72.16 45.63 69.99 41.21 C 69.26 39.71 67.55 37.04 67.26 36.93 C 67.15 36.89 64.57 39.13 60.33 42.94 C 55.31 47.47 53.53 49 53.37 48.94 C 53.04 48.82 50.74 46.18 50.74 45.93 C 50.74 45.78 53.12 43.56 57.22 39.87 C 60.78 36.66 63.8 33.92 63.93 33.78 C 64.17 33.52 64.17 33.51 63.56 32.95 C 62.49 31.96 60.16 30.26 58.49 29.27 C 56.4 28.03 56.5 28.13 56.82 27.65 C 57.76 26.22 58.17 24.99 58.26 23.29 C 58.57 17.72 53.31 13.39 47.94 14.8"/></symbol>
10
- <symbol id="wN" viewBox="0 0 100 100"><path fill="#ffffff" stroke="#000000" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 46.89 17.57 C 45.43 18.11 42.7 20.68 41.27 22.85 C 40.45 24.1 40.43 24.11 39.99 24.07 C 39.57 24.04 39.45 23.92 38.45 22.6 C 35.21 18.3 32.25 17.08 29.74 18.99 C 28.58 19.87 28.51 20.13 28.5 23.29 L 28.5 26.02 28.92 27.29 C 29.3 28.42 29.33 28.61 29.2 29.02 C 29 29.71 27.96 31.32 26.96 32.53 C 25.57 34.18 25.39 34.45 23.47 37.77 C 17.23 48.54 13.27 56.4 12.24 60.06 C 11.79 61.65 12.04 65.82 12.7 67.85 C 13.68 70.84 15.82 72.99 18.43 73.61 C 18.91 73.72 19.85 73.79 20.94 73.79 L 22.67 73.79 23.41 74.62 C 24.47 75.8 24.83 75.94 26.88 75.88 C 28.48 75.84 28.53 75.83 29.47 75.37 C 30.74 74.74 31.71 73.81 33.35 71.65 C 35.17 69.24 36.64 67.82 38.85 66.3 C 42.68 63.68 46.42 60.73 48.6 58.63 C 49.48 57.78 49.58 57.93 49.2 59.49 C 48.41 62.74 47.02 65.54 44.9 68.11 C 44.55 68.54 42.66 70.52 40.71 72.49 C 36.13 77.13 35.17 78.34 33.82 81.14 C 32.61 83.68 32.11 85.68 31.88 88.93 C 31.77 90.56 31.77 91.11 31.89 91.51 C 32.08 92.14 32.77 92.94 33.41 93.26 C 33.87 93.5 34.39 93.5 60.08 93.47 L 86.27 93.44 86.78 93.1 C 87.07 92.91 87.46 92.52 87.64 92.24 L 87.99 91.72 87.98 84.46 C 87.98 69.95 86.71 59.96 83.71 50.87 C 80.58 41.34 75.16 33.92 68.22 29.62 C 64.18 27.12 59.38 25.39 54.09 24.54 C 52.7 24.31 52.66 24.28 52.55 23.34 C 52.17 19.97 50.43 17.67 48.12 17.47 C 47.61 17.43 47.18 17.46 46.89 17.57"/></symbol>
11
- <symbol id="wP" viewBox="0 0 100 100"><path fill="#ffffff" stroke="#000000" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 47.46 20.93 C 43.58 21.81 40.33 24.74 38.99 28.59 C 38.35 30.41 38.27 33.23 38.78 35.33 L 39.11 36.68 37.83 37.98 C 35.35 40.5 33.73 43.58 33.13 46.9 C 32.91 48.12 32.91 51.76 33.13 52.97 C 33.49 54.97 34.57 57.64 35.67 59.28 C 35.92 59.64 36.12 60.01 36.12 60.1 C 36.12 60.19 35.59 60.66 34.95 61.15 C 26.62 67.41 21.87 78.24 21.87 90.98 L 21.87 92.66 22.29 93.08 L 22.71 93.5 50 93.5 L 77.29 93.5 77.71 93.08 L 78.13 92.66 78.13 90.94 C 78.12 78.25 73.37 67.4 65.09 61.18 C 64.42 60.68 63.88 60.19 63.88 60.1 C 63.88 60.01 64.08 59.64 64.33 59.28 C 65.43 57.64 66.51 54.97 66.87 52.97 C 67.09 51.76 67.09 48.12 66.87 46.9 C 66.27 43.59 64.61 40.45 62.11 37.92 C 60.76 36.55 60.81 36.7 61.24 35.31 C 61.42 34.7 61.46 34.15 61.46 32.22 L 61.46 29.86 61.01 28.59 C 59.79 25.1 57.15 22.47 53.69 21.27 C 52.45 20.84 52.36 20.83 50.31 20.79 C 48.86 20.77 47.97 20.81 47.46 20.93"/></symbol>
12
- <symbol id="bK" viewBox="0 0 100 100"><path fill="#000000" stroke="#9aa3ad" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 48.88 14.07 C 47.67 14.62 47.27 15.31 47.27 16.89 C 47.27 17.63 47.22 18.04 47.12 18.12 C 47.03 18.2 46.18 18.27 45.21 18.29 C 43.49 18.33 43.44 18.34 42.92 18.71 C 41.51 19.68 41.3 21.73 42.48 22.96 C 43.17 23.68 43.45 23.77 45.29 23.83 C 46.21 23.85 47.03 23.93 47.12 24 C 47.29 24.14 47.34 27.15 47.18 27.39 C 47.13 27.47 46.67 27.75 46.16 28.01 C 45.02 28.61 43.13 30.38 42.2 31.72 C 40.89 33.62 40.14 35.58 40 37.46 C 39.95 38.11 39.87 38.52 39.77 38.56 C 39.69 38.59 39.21 38.41 38.72 38.16 C 31.35 34.45 22.62 35.03 16.99 39.61 C 12.32 43.41 10.18 48.02 10.69 53.22 C 11.1 57.41 12.94 60.8 17.02 64.88 C 19.25 67.11 20.52 68.14 23.11 69.86 C 24.03 70.47 24.88 71.06 25 71.16 C 25.2 71.34 25.21 71.85 25.21 78.53 C 25.21 86.57 25.17 86.19 26.13 87.02 C 27.43 88.17 31.88 90.26 35.38 91.37 C 42.19 93.53 51.23 94.06 58.88 92.75 C 64.26 91.83 71.41 89.11 73.81 87.07 C 74.83 86.2 74.79 86.62 74.79 78.52 L 74.79 71.34 75.13 71.07 C 75.31 70.92 76.11 70.38 76.89 69.86 C 79.37 68.23 80.73 67.11 82.91 64.94 C 87.07 60.78 88.89 57.44 89.31 53.22 C 89.81 48.04 87.76 43.57 83.09 39.68 C 77.64 35.15 69.15 34.45 61.78 37.93 C 61 38.3 60.29 38.58 60.2 38.54 C 60.1 38.5 60.04 38.26 60.04 37.87 C 60.04 36.28 59.4 34.35 58.22 32.35 C 57.35 30.89 55.09 28.65 53.84 28 C 53.33 27.74 52.87 27.47 52.82 27.39 C 52.66 27.15 52.71 24.14 52.88 24 C 52.97 23.93 53.79 23.85 54.71 23.83 C 56.55 23.77 56.83 23.68 57.52 22.96 C 58.7 21.73 58.49 19.68 57.08 18.71 C 56.56 18.34 56.51 18.33 54.79 18.29 C 53.82 18.27 52.97 18.2 52.88 18.12 C 52.78 18.04 52.73 17.63 52.73 16.89 C 52.73 15.7 52.54 15.13 51.96 14.59 C 51.51 14.17 50.61 13.82 50 13.82 C 49.69 13.82 49.19 13.93 48.88 14.07"/></symbol>
13
- <symbol id="bQ" viewBox="0 0 100 100"><path fill="#000000" stroke="#9aa3ad" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 48.88 14.76 C 46.24 15.1 43.63 17.49 43 20.16 C 42.32 23.05 43.55 26.3 45.91 27.83 C 46.24 28.05 46.55 28.3 46.58 28.4 C 46.64 28.54 42.98 46.6 42.74 47.43 C 42.7 47.55 42.6 47.65 42.52 47.65 C 42.41 47.65 37.26 34.47 35.66 30.08 C 35.63 30 36 29.51 36.49 28.99 C 41.97 23.2 35.24 14.15 28.07 17.67 C 22.82 20.25 22.76 27.82 27.97 30.48 C 28.67 30.84 28.96 31.06 29.01 31.27 C 29.13 31.72 28.72 49.52 28.59 49.65 C 28.53 49.71 28.4 49.67 28.29 49.54 C 28.03 49.25 19.4 36.01 19.23 35.66 C 19.13 35.44 19.17 35.32 19.44 34.99 C 20.97 33.18 21.27 29.96 20.13 27.58 C 17.97 23.07 12 22.11 8.48 25.72 C 6.3 27.95 5.84 31.33 7.32 34.15 C 8.24 35.89 10.18 37.33 12.22 37.78 C 12.46 37.83 12.59 37.97 12.68 38.26 C 12.84 38.77 17.47 62.15 17.65 63.38 C 17.91 65.14 18.62 66.31 20.68 68.39 C 21.46 69.17 22.33 70.19 22.63 70.65 C 22.93 71.11 23.52 72.02 23.95 72.67 C 24.72 73.83 24.74 73.87 24.67 74.51 C 24.5 75.99 24.35 76.38 23.65 77.18 C 22.43 78.58 21.74 80.25 21.74 81.83 C 21.74 82.51 21.69 82.72 21.37 83.22 C 19.84 85.6 20.16 88.55 22.16 90.58 C 23.05 91.49 23.49 91.74 24.45 91.89 C 35.42 93.65 55.36 94.01 68.96 92.69 C 75.92 92.02 76.75 91.82 77.95 90.49 C 79.86 88.38 80.13 85.55 78.63 83.22 C 78.31 82.72 78.26 82.51 78.26 81.83 C 78.26 80.25 77.57 78.58 76.35 77.18 C 75.65 76.38 75.48 75.93 75.32 74.47 C 75.26 73.89 75.29 73.8 75.81 73.05 C 76.11 72.61 76.68 71.74 77.06 71.12 C 77.55 70.33 78.21 69.53 79.26 68.46 C 81.42 66.26 82.09 65.15 82.35 63.38 C 82.53 62.15 87.16 38.77 87.32 38.26 C 87.41 37.97 87.54 37.83 87.78 37.78 C 90.53 37.17 92.84 34.92 93.38 32.3 C 93.6 31.27 93.48 29.15 93.15 28.25 C 91.35 23.32 85 21.91 81.28 25.63 C 78.86 28.05 78.45 31.92 80.33 34.67 C 80.57 35.02 80.77 35.41 80.76 35.53 C 80.75 35.72 72.68 48.24 71.84 49.36 C 71.65 49.62 71.49 49.73 71.42 49.65 C 71.28 49.52 70.87 31.74 70.99 31.27 C 71.04 31.06 71.33 30.84 72.03 30.48 C 76.34 28.28 77.25 22.45 73.82 19.04 C 70.96 16.19 66.49 16.18 63.65 19.03 C 60.84 21.84 60.8 26.24 63.57 29.1 C 64.02 29.57 64.37 30.02 64.34 30.09 C 62.84 34.22 57.59 47.65 57.48 47.65 C 57.27 47.65 57.43 48.32 55.26 37.85 L 53.33 28.5 53.86 28.06 C 56.66 25.8 57.71 23.16 57 20.16 C 56.47 17.92 54.54 15.83 52.29 15.05 C 51.58 14.81 49.74 14.65 48.88 14.76"/></symbol>
14
- <symbol id="bR" viewBox="0 0 100 100"><path fill="#000000" stroke="#9aa3ad" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 23.54 22.04 C 23.04 22.27 22.29 23.07 22.06 23.63 C 21.77 24.33 21.77 36.19 22.07 36.78 C 22.18 36.99 23.68 38.6 25.41 40.34 L 28.56 43.5 28.56 56.12 C 28.56 67.53 28.54 68.76 28.36 69.12 C 28.25 69.34 27.77 70.17 27.3 70.96 C 26.52 72.27 26.39 72.42 25.84 72.68 C 25.5 72.84 25.06 73.14 24.86 73.35 C 24.14 74.09 24.1 74.34 24.1 77.86 C 24.1 80.18 24.06 81.1 23.95 81.21 C 23.85 81.31 23.16 81.35 21.65 81.35 C 19.02 81.35 18.43 81.58 17.77 82.87 C 17.43 83.52 17.4 91.28 17.73 91.93 C 18.01 92.48 18.51 92.99 19.04 93.26 C 19.76 93.63 80.24 93.63 80.96 93.26 C 81.49 92.99 81.99 92.48 82.27 91.93 C 82.6 91.28 82.57 83.52 82.23 82.87 C 81.57 81.58 80.98 81.35 78.35 81.35 C 76.84 81.35 76.15 81.31 76.05 81.21 C 75.94 81.1 75.9 80.18 75.9 77.86 C 75.9 74.34 75.86 74.09 75.14 73.35 C 74.94 73.14 74.5 72.84 74.16 72.68 C 73.61 72.42 73.48 72.27 72.7 70.96 C 72.23 70.17 71.75 69.34 71.64 69.12 C 71.46 68.76 71.44 67.53 71.44 56.12 L 71.44 43.5 74.59 40.34 C 76.32 38.6 77.82 36.99 77.93 36.78 C 78.26 36.13 78.23 24.25 77.9 23.54 C 77.6 22.89 76.66 22.03 76.13 21.93 C 75.9 21.89 73.43 21.87 70.63 21.89 L 65.53 21.93 65.02 22.27 C 64.11 22.87 63.83 23.46 63.78 24.83 C 63.75 25.49 63.68 26.09 63.61 26.17 C 63.43 26.39 58.67 26.4 58.45 26.18 C 58.36 26.09 58.3 25.64 58.3 25.03 C 58.3 23.85 58.07 23.27 57.36 22.59 C 56.59 21.86 56.71 21.87 50 21.87 C 43.29 21.87 43.41 21.86 42.64 22.59 C 41.93 23.27 41.7 23.85 41.7 25.03 C 41.7 25.64 41.64 26.09 41.55 26.18 C 41.33 26.4 36.57 26.39 36.39 26.17 C 36.32 26.09 36.25 25.49 36.22 24.83 C 36.17 23.46 35.89 22.87 34.98 22.27 L 34.47 21.93 29.19 21.9 C 24.95 21.88 23.84 21.91 23.54 22.04"/></symbol>
15
- <symbol id="bB" viewBox="0 0 100 100"><path fill="#000000" stroke="#9aa3ad" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 47.94 14.8 C 44.97 15.58 42.49 18.14 41.88 21.06 C 41.41 23.31 41.88 25.71 43.18 27.65 C 43.5 28.13 43.6 28.03 41.51 29.27 C 33.26 34.18 28.18 41.7 27.85 49.5 C 27.64 54.58 29.01 58.36 32.25 61.63 C 33.08 62.48 33.76 63.21 33.76 63.27 C 33.76 63.33 33.48 63.74 33.14 64.2 C 31.99 65.71 30.79 68.56 30.79 69.76 C 30.79 69.98 30.68 70.48 30.55 70.86 C 30.06 72.3 30.11 74.37 30.68 76.23 C 31.09 77.56 32.24 78.62 34.54 79.8 C 35.22 80.15 35.77 80.49 35.76 80.55 C 35.75 80.72 33.76 80.83 30.48 80.85 C 25.35 80.88 21.76 81.19 19.67 81.8 C 17.4 82.46 14.37 84.32 12.35 86.3 C 11.04 87.58 10.76 88.14 10.88 89.25 C 11.05 90.9 13.21 92.87 15.41 93.38 C 16.46 93.62 18.72 93.47 20.01 93.07 C 23.2 92.09 24.79 91.98 34.07 92.08 C 43.14 92.19 45.97 92.01 49.1 91.14 L 50 90.88 50.9 91.14 C 54.03 92.01 56.75 92.19 65.86 92.08 C 75.22 91.98 76.8 92.09 79.99 93.07 C 81.28 93.47 83.54 93.62 84.59 93.38 C 86.79 92.87 88.95 90.9 89.12 89.25 C 89.24 88.14 88.96 87.58 87.65 86.3 C 84.69 83.4 81.19 81.67 77.39 81.24 C 76.74 81.17 75.96 81.08 75.65 81.04 C 75.35 81.01 72.67 80.92 69.71 80.86 C 66.65 80.79 64.28 80.69 64.21 80.62 C 64.14 80.55 64.52 80.29 65.26 79.92 C 67.68 78.7 68.9 77.6 69.32 76.22 C 69.89 74.39 69.94 72.27 69.45 70.85 C 69.32 70.47 69.21 70.01 69.21 69.83 C 69.21 68.6 68.01 65.71 66.87 64.21 C 66.52 63.75 66.24 63.33 66.24 63.27 C 66.24 63.21 66.92 62.48 67.75 61.63 C 69.84 59.53 70.94 57.62 71.62 54.93 C 72.74 50.52 72.16 45.63 69.99 41.21 C 69.26 39.71 67.55 37.04 67.26 36.93 C 67.15 36.89 64.57 39.13 60.33 42.94 C 55.31 47.47 53.53 49 53.37 48.94 C 53.04 48.82 50.74 46.18 50.74 45.93 C 50.74 45.78 53.12 43.56 57.22 39.87 C 60.78 36.66 63.8 33.92 63.93 33.78 C 64.17 33.52 64.17 33.51 63.56 32.95 C 62.49 31.96 60.16 30.26 58.49 29.27 C 56.4 28.03 56.5 28.13 56.82 27.65 C 57.76 26.22 58.17 24.99 58.26 23.29 C 58.57 17.72 53.31 13.39 47.94 14.8"/></symbol>
16
- <symbol id="bN" viewBox="0 0 100 100"><path fill="#000000" stroke="#9aa3ad" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 46.89 17.57 C 45.43 18.11 42.7 20.68 41.27 22.85 C 40.45 24.1 40.43 24.11 39.99 24.07 C 39.57 24.04 39.45 23.92 38.45 22.6 C 35.21 18.3 32.25 17.08 29.74 18.99 C 28.58 19.87 28.51 20.13 28.5 23.29 L 28.5 26.02 28.92 27.29 C 29.3 28.42 29.33 28.61 29.2 29.02 C 29 29.71 27.96 31.32 26.96 32.53 C 25.57 34.18 25.39 34.45 23.47 37.77 C 17.23 48.54 13.27 56.4 12.24 60.06 C 11.79 61.65 12.04 65.82 12.7 67.85 C 13.68 70.84 15.82 72.99 18.43 73.61 C 18.91 73.72 19.85 73.79 20.94 73.79 L 22.67 73.79 23.41 74.62 C 24.47 75.8 24.83 75.94 26.88 75.88 C 28.48 75.84 28.53 75.83 29.47 75.37 C 30.74 74.74 31.71 73.81 33.35 71.65 C 35.17 69.24 36.64 67.82 38.85 66.3 C 42.68 63.68 46.42 60.73 48.6 58.63 C 49.48 57.78 49.58 57.93 49.2 59.49 C 48.41 62.74 47.02 65.54 44.9 68.11 C 44.55 68.54 42.66 70.52 40.71 72.49 C 36.13 77.13 35.17 78.34 33.82 81.14 C 32.61 83.68 32.11 85.68 31.88 88.93 C 31.77 90.56 31.77 91.11 31.89 91.51 C 32.08 92.14 32.77 92.94 33.41 93.26 C 33.87 93.5 34.39 93.5 60.08 93.47 L 86.27 93.44 86.78 93.1 C 87.07 92.91 87.46 92.52 87.64 92.24 L 87.99 91.72 87.98 84.46 C 87.98 69.95 86.71 59.96 83.71 50.87 C 80.58 41.34 75.16 33.92 68.22 29.62 C 64.18 27.12 59.38 25.39 54.09 24.54 C 52.7 24.31 52.66 24.28 52.55 23.34 C 52.17 19.97 50.43 17.67 48.12 17.47 C 47.61 17.43 47.18 17.46 46.89 17.57"/></symbol>
17
- <symbol id="bP" viewBox="0 0 100 100"><path fill="#000000" stroke="#9aa3ad" stroke-width="7" stroke-linejoin="round" paint-order="stroke" d="M 47.46 20.93 C 43.58 21.81 40.33 24.74 38.99 28.59 C 38.35 30.41 38.27 33.23 38.78 35.33 L 39.11 36.68 37.83 37.98 C 35.35 40.5 33.73 43.58 33.13 46.9 C 32.91 48.12 32.91 51.76 33.13 52.97 C 33.49 54.97 34.57 57.64 35.67 59.28 C 35.92 59.64 36.12 60.01 36.12 60.1 C 36.12 60.19 35.59 60.66 34.95 61.15 C 26.62 67.41 21.87 78.24 21.87 90.98 L 21.87 92.66 22.29 93.08 L 22.71 93.5 50 93.5 L 77.29 93.5 77.71 93.08 L 78.13 92.66 78.13 90.94 C 78.12 78.25 73.37 67.4 65.09 61.18 C 64.42 60.68 63.88 60.19 63.88 60.1 C 63.88 60.01 64.08 59.64 64.33 59.28 C 65.43 57.64 66.51 54.97 66.87 52.97 C 67.09 51.76 67.09 48.12 66.87 46.9 C 66.27 43.59 64.61 40.45 62.11 37.92 C 60.76 36.55 60.81 36.7 61.24 35.31 C 61.42 34.7 61.46 34.15 61.46 32.22 L 61.46 29.86 61.01 28.59 C 59.79 25.1 57.15 22.47 53.69 21.27 C 52.45 20.84 52.36 20.83 50.31 20.79 C 48.86 20.77 47.97 20.81 47.46 20.93"/></symbol>
18
- </defs>
19
- <rect x="0" y="0" width="100" height="100" fill="#f4f6f8"/><use href="#wK" x="0" y="0" width="100" height="100"/><rect x="0" y="100" width="100" height="100" fill="#3a4048"/><use href="#bK" x="0" y="100" width="100" height="100"/><rect x="100" y="0" width="100" height="100" fill="#3a4048"/><use href="#wQ" x="100" y="0" width="100" height="100"/><rect x="100" y="100" width="100" height="100" fill="#f4f6f8"/><use href="#bQ" x="100" y="100" width="100" height="100"/><rect x="200" y="0" width="100" height="100" fill="#f4f6f8"/><use href="#wR" x="200" y="0" width="100" height="100"/><rect x="200" y="100" width="100" height="100" fill="#3a4048"/><use href="#bR" x="200" y="100" width="100" height="100"/><rect x="300" y="0" width="100" height="100" fill="#3a4048"/><use href="#wB" x="300" y="0" width="100" height="100"/><rect x="300" y="100" width="100" height="100" fill="#f4f6f8"/><use href="#bB" x="300" y="100" width="100" height="100"/><rect x="400" y="0" width="100" height="100" fill="#f4f6f8"/><use href="#wN" x="400" y="0" width="100" height="100"/><rect x="400" y="100" width="100" height="100" fill="#3a4048"/><use href="#bN" x="400" y="100" width="100" height="100"/><rect x="500" y="0" width="100" height="100" fill="#3a4048"/><use href="#wP" x="500" y="0" width="100" height="100"/><rect x="500" y="100" width="100" height="100" fill="#f4f6f8"/><use href="#bP" x="500" y="100" width="100" height="100"/>
20
- </svg>
@@ -1,20 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 600 200" width="600" height="200">
2
- <!-- Chesspal, the piece set "cburnett" by Colin M.L. Burnett, under the licence BSD 3-Clause (one of the licences the author offers: GFDL, CC BY-SA 3.0, BSD, GPL).
3
- Source: https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces (Chess_klt45.svg and the others)
4
- Changed for Chesspal (D-52): the twelve pieces gathered in one file as symbols wK to bP, their styles written on the elements, their ids prefixed. -->
5
- <defs>
6
- <symbol id="wK" viewBox="0 0 45 45"><g fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"> <path stroke-linejoin="miter" d="M22.5 11.63V6M20 8h5"/> <path fill="#fff" stroke-linecap="butt" stroke-linejoin="miter" d="M22.5 25s4.5-7.5 3-10.5c0 0-1-2.5-3-2.5s-3 2.5-3 2.5c-1.5 3 3 10.5 3 10.5"/> <path fill="#fff" d="M12.5 37c5.5 3.5 14.5 3.5 20 0v-7s9-4.5 6-10.5c-4-6.5-13.5-3.5-16 4V27v-3.5c-2.5-7.5-12-10.5-16-4-3 6 6 10.5 6 10.5v7"/> <path d="M12.5 30c5.5-3 14.5-3 20 0m-20 3.5c5.5-3 14.5-3 20 0m-20 3.5c5.5-3 14.5-3 20 0"/> </g></symbol>
7
- <symbol id="wQ" viewBox="0 0 45 45"><g style="fill:#ffffff;stroke:#000000;stroke-width:1.5;stroke-linejoin:round"> <path d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z"/> <path d="M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 11,36 11,36 C 9.5,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z"/> <path d="M 11.5,30 C 15,29 30,29 33.5,30" style="fill:none"/> <path d="M 12,33.5 C 18,32.5 27,32.5 33,33.5" style="fill:none"/> <circle cx="6" cy="12" r="2" /> <circle cx="14" cy="9" r="2" /> <circle cx="22.5" cy="8" r="2" /> <circle cx="31" cy="9" r="2" /> <circle cx="39" cy="12" r="2" /> </g></symbol>
8
- <symbol id="wR" viewBox="0 0 45 45"><g style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)"> <path d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z " style="stroke-linecap:butt;" /> <path d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z " style="stroke-linecap:butt;" /> <path d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14" style="stroke-linecap:butt;" /> <path d="M 34,14 L 31,17 L 14,17 L 11,14" /> <path d="M 31,17 L 31,29.5 L 14,29.5 L 14,17" style="stroke-linecap:butt; stroke-linejoin:miter;" /> <path d="M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5" /> <path d="M 11,14 L 34,14" style="fill:none; stroke:#000000; stroke-linejoin:miter;" /> </g></symbol>
9
- <symbol id="wB" viewBox="0 0 45 45"><g style="opacity:1; fill:none; fill-rule:evenodd; fill-opacity:1; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.6)"> <g style="fill:#ffffff; stroke:#000000; stroke-linecap:butt;"> <path d="M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"/> <path d="M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"/> <path d="M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"/> </g> <path d="M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18" style="fill:none; stroke:#000000; stroke-linejoin:miter;"/> </g></symbol>
10
- <symbol id="wN" viewBox="0 0 45 45"><g style="opacity:1; fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)"> <path d="M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18" style="fill:#ffffff; stroke:#000000;" /> <path d="M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10" style="fill:#ffffff; stroke:#000000;" /> <path d="M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z" style="fill:#000000; stroke:#000000;" /> <path d="M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z" transform="matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)" style="fill:#000000; stroke:#000000;" /> </g></symbol>
11
- <symbol id="wP" viewBox="0 0 45 45"><path d="m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z" style="opacity:1; fill:#ffffff; fill-opacity:1; fill-rule:nonzero; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"/></symbol>
12
- <symbol id="bK" viewBox="0 0 45 45"><g style="fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"> <path d="M 22.5,11.63 L 22.5,6" style="fill:none; stroke:#000000; stroke-linejoin:miter;" id="bK-path6570"/> <path d="M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25" style="fill:#000000;fill-opacity:1; stroke-linecap:butt; stroke-linejoin:miter;"/> <path d="M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37" style="fill:#000000; stroke:#000000;"/> <path d="M 20,8 L 25,8" style="fill:none; stroke:#000000; stroke-linejoin:miter;"/> <path d="M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5" style="fill:none; stroke:#ffffff;"/> <path d="M 12.5,30 C 18,27 27,27 32.5,30 M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5 M 12.5,37 C 18,34 27,34 32.5,37" style="fill:none; stroke:#ffffff;"/> </g></symbol>
13
- <symbol id="bQ" viewBox="0 0 45 45"><g style="fill:#000000;stroke:#000000;stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round"> <path d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z" style="stroke-linecap:butt;fill:#000000" /> <path d="m 9,26 c 0,2 1.5,2 2.5,4 1,1.5 1,1 0.5,3.5 -1.5,1 -1,2.5 -1,2.5 -1.5,1.5 0,2.5 0,2.5 6.5,1 16.5,1 23,0 0,0 1.5,-1 0,-2.5 0,0 0.5,-1.5 -1,-2.5 -0.5,-2.5 -0.5,-2 0.5,-3.5 1,-2 2.5,-2 2.5,-4 -8.5,-1.5 -18.5,-1.5 -27,0 z" /> <path d="M 11.5,30 C 15,29 30,29 33.5,30" /> <path d="m 12,33.5 c 6,-1 15,-1 21,0" /> <circle cx="6" cy="12" r="2" /> <circle cx="14" cy="9" r="2" /> <circle cx="22.5" cy="8" r="2" /> <circle cx="31" cy="9" r="2" /> <circle cx="39" cy="12" r="2" /> <path d="M 11,38.5 A 35,35 1 0 0 34,38.5" style="fill:none; stroke:#000000;stroke-linecap:butt;" /> <g style="fill:none; stroke:#ffffff;"> <path d="M 11,29 A 35,35 1 0 1 34,29" /> <path d="M 12.5,31.5 L 32.5,31.5" /> <path d="M 11.5,34.5 A 35,35 1 0 0 33.5,34.5" /> <path d="M 10.5,37.5 A 35,35 1 0 0 34.5,37.5" /> </g> </g></symbol>
14
- <symbol id="bR" viewBox="0 0 45 45"><g style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)"> <path d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z " style="stroke-linecap:butt;" /> <path d="M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z " style="stroke-linecap:butt;" /> <path d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z " style="stroke-linecap:butt;" /> <path d="M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z " style="stroke-linecap:butt;stroke-linejoin:miter;" /> <path d="M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z " style="stroke-linecap:butt;" /> <path d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z " style="stroke-linecap:butt;" /> <path d="M 12,35.5 L 33,35.5 L 33,35.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 13,31.5 L 32,31.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 14,29.5 L 31,29.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 14,16.5 L 31,16.5" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> <path d="M 11,14 L 34,14" style="fill:none; stroke:#ffffff; stroke-width:1; stroke-linejoin:miter;" /> </g></symbol>
15
- <symbol id="bB" viewBox="0 0 45 45"><g style="opacity:1; fill:none; fill-rule:evenodd; fill-opacity:1; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.6)"> <g style="fill:#000000; stroke:#000000; stroke-linecap:butt;"> <path d="M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"/> <path d="M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"/> <path d="M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"/> </g> <path d="M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18" style="fill:none; stroke:#ffffff; stroke-linejoin:miter;"/> </g></symbol>
16
- <symbol id="bN" viewBox="0 0 45 45"><g style="opacity:1; fill:none; fill-opacity:1; fill-rule:evenodd; stroke:#000000; stroke-width:1.5; stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;" transform="translate(0,0.3)"> <path d="M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18" style="fill:#000000; stroke:#000000;" /> <path d="M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10" style="fill:#000000; stroke:#000000;" /> <path d="M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z" style="fill:#ffffff; stroke:#ffffff;" /> <path d="M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z" transform="matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)" style="fill:#ffffff; stroke:#ffffff;" /> <path d="M 24.55,10.4 L 24.1,11.85 L 24.6,12 C 27.75,13 30.25,14.49 32.5,18.75 C 34.75,23.01 35.75,29.06 35.25,39 L 35.2,39.5 L 37.45,39.5 L 37.5,39 C 38,28.94 36.62,22.15 34.25,17.66 C 31.88,13.17 28.46,11.02 25.06,10.5 L 24.55,10.4 z " style="fill:#ffffff; stroke:none;" /> </g></symbol>
17
- <symbol id="bP" viewBox="0 0 45 45"><path d="m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z" style="opacity:1; fill:#000000; fill-opacity:1; fill-rule:nonzero; stroke:#000000; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:miter; stroke-miterlimit:4; stroke-dasharray:none; stroke-opacity:1;"/></symbol>
18
- </defs>
19
- <rect x="0" y="0" width="100" height="100" fill="#eaf1f8"/><use href="#wK" x="0" y="0" width="100" height="100"/><rect x="100" y="0" width="100" height="100" fill="#86abd0"/><use href="#wQ" x="100" y="0" width="100" height="100"/><rect x="200" y="0" width="100" height="100" fill="#eaf1f8"/><use href="#wR" x="200" y="0" width="100" height="100"/><rect x="300" y="0" width="100" height="100" fill="#86abd0"/><use href="#wB" x="300" y="0" width="100" height="100"/><rect x="400" y="0" width="100" height="100" fill="#eaf1f8"/><use href="#wN" x="400" y="0" width="100" height="100"/><rect x="500" y="0" width="100" height="100" fill="#86abd0"/><use href="#wP" x="500" y="0" width="100" height="100"/><rect x="0" y="100" width="100" height="100" fill="#86abd0"/><use href="#bK" x="0" y="100" width="100" height="100"/><rect x="100" y="100" width="100" height="100" fill="#eaf1f8"/><use href="#bQ" x="100" y="100" width="100" height="100"/><rect x="200" y="100" width="100" height="100" fill="#86abd0"/><use href="#bR" x="200" y="100" width="100" height="100"/><rect x="300" y="100" width="100" height="100" fill="#eaf1f8"/><use href="#bB" x="300" y="100" width="100" height="100"/><rect x="400" y="100" width="100" height="100" fill="#86abd0"/><use href="#bN" x="400" y="100" width="100" height="100"/><rect x="500" y="100" width="100" height="100" fill="#eaf1f8"/><use href="#bP" x="500" y="100" width="100" height="100"/>
20
- </svg>
@@ -1,32 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
2
- import { useEffect, useRef } from "preact/hooks";
3
- import { Piece } from "./pieces.js";
4
- import { looks, pieceSets } from "./settings.js";
5
- /** The panel of the settings, open while `open` is true: every change goes to `onChange` at once. */
6
- export function SettingsPanel({ open, settings, onChange, onClose, text }) {
7
- const dialog = useRef(null);
8
- useEffect(() => {
9
- const element = dialog.current;
10
- if (open && !element.open) {
11
- element.showModal();
12
- }
13
- else if (!open && element.open) {
14
- element.close();
15
- }
16
- }, [open]);
17
- const set = (key, value) => onChange({ ...settings, [key]: value });
18
- return (_jsxs("dialog", { ref: dialog, class: "settings", "aria-label": text.settings, onClose: onClose, onClick: (event) => event.target === dialog.current && onClose(), children: [_jsxs("header", { children: [_jsx("h2", { children: text.settings }), _jsx("button", { class: "theme", type: "button", title: text.close, "aria-label": text.close, onClick: onClose, children: _jsx("svg", { class: "icon", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M6 6L18 18M18 6L6 18" }) }) })] }), _jsx("h3", { children: text.look }), _jsx(Choices, { label: text.themeChoice, children: ["system", "light", "dark"].map((theme) => _jsx(Choice, { on: settings.theme === theme, onPick: () => set("theme", theme), children: text.themes[theme] }, theme)) }), _jsx(Swatches, { look: "board", label: text.boardSkin, settings: settings, onPick: (id) => set("board", id), text: text }), _jsx(Choices, { label: text.pieceSet, children: pieceSets.map((pieceSet) => (_jsxs(Choice, { on: settings.set === pieceSet, onPick: () => set("set", pieceSet), children: [_jsxs("span", { class: "sample", children: [_jsx(Piece, { letter: "N", set: pieceSet }), _jsx(Piece, { letter: "n", set: pieceSet })] }), text.names[pieceSet] ?? pieceSet] }, pieceSet))) }), settings.set === "cburnett" ? null : _jsx(Swatches, { look: "pieces", label: text.pieceColours, settings: settings, onPick: (id) => set("pieces", id), text: text }), _jsx(Swatches, { look: "marks", label: text.marksColour, settings: settings, onPick: (id) => set("marks", id), text: text }), _jsx("h3", { children: text.play }), _jsx(Toggle, { on: settings.dots, onSwitch: (on) => set("dots", on), children: text.dots }), _jsx(Toggle, { on: settings.explain, onSwitch: (on) => set("explain", on), children: text.explain }), _jsx(Toggle, { on: settings.book, onSwitch: (on) => set("book", on), children: text.bookBadges }), _jsx(Toggle, { on: settings.helps, onSwitch: (on) => set("helps", on), children: text.helps }), _jsx(Toggle, { on: settings.sound, onSwitch: (on) => set("sound", on), children: text.sounds }), _jsx(Toggle, { on: settings.voice, onSwitch: (on) => set("voice", on), children: text.voice }), _jsx("h3", { children: text.languageChoice }), _jsx(Choices, { label: text.languageChoice, children: ["auto", "it", "en"].map((language) => _jsx(Choice, { on: settings.language === language, onPick: () => set("language", language), children: text.languages[language] }, language)) })] }));
19
- }
20
- /** The choices of a look, each a swatch drawn by the style sheet with the look's own colours. */
21
- function Swatches({ look, label, settings, onPick, text }) {
22
- return (_jsx(Choices, { label: label, children: looks[look].map((id) => (_jsxs(Choice, { on: settings[look] === id, onPick: () => onPick(id), children: [_jsxs("span", { class: "swatch", [`data-${look}`]: id, children: [_jsx("i", {}), look === "marks" ? null : _jsx("i", {}), look === "board" ? _jsx("i", {}) : null] }), text.names[id] ?? id] }, id))) }));
23
- }
24
- function Choices({ label, children }) {
25
- return (_jsxs("div", { class: "choices", role: "radiogroup", "aria-label": label, children: [_jsx("span", { class: "label", children: label }), _jsx("div", { class: "options", children: children })] }));
26
- }
27
- function Choice({ on, onPick, children }) {
28
- return (_jsx("button", { class: "choice", type: "button", role: "radio", "aria-checked": on, onClick: onPick, children: children }));
29
- }
30
- function Toggle({ on, onSwitch, children }) {
31
- return (_jsxs("label", { class: "toggle", children: [_jsx("span", { children: children }), _jsx("input", { type: "checkbox", role: "switch", checked: on, onChange: (event) => onSwitch(event.currentTarget.checked) })] }));
32
- }
@@ -1,14 +0,0 @@
1
- /** Both sides of a game in analysis, and the one at the bottom: the player's, when one of them is, else White. */
2
- export function studiedSides(tags, you, ai, sides) {
3
- const sideOf = (side) => {
4
- const tag = (side === "white" ? tags.White : tags.Black)?.trim() ?? "";
5
- if (tag === "Player" || tag.toLowerCase() === you.trim().toLowerCase()) {
6
- return { name: you, who: "player" };
7
- }
8
- // A tag PGN leaves unknown names the side.
9
- return tag === "AI" ? { name: ai, who: "ai" } : { name: /^[?\-\s]*$/.test(tag) ? sides[side] : tag, who: "other" };
10
- };
11
- const white = sideOf("white");
12
- const black = sideOf("black");
13
- return { white, black, bottom: black.who === "player" && white.who !== "player" ? "black" : "white" };
14
- }
@@ -1,58 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
2
- // The dialog of the analyses (T-92, T-106): the games analysed or brought to study, to open again, and a game played elsewhere brought as a PGN, pasted or read
3
- // from a file, which the server keeps to study and puts in analysis.
4
- import { useEffect, useState } from "preact/hooks";
5
- import { Dialog } from "./dialog.js";
6
- import { signature } from "./model-name.js";
7
- import { studiedSides } from "./studied.js";
8
- /**
9
- * The dialog the header's button opens; `onStudy` sends the choice and gives back why the server refused it, or undefined once it took it. The games played
10
- * here name their sides as their analysis does: the player by `you`, the AI by its model when the game keeps it (D-82), else by `ai`.
11
- */
12
- export function StudyDialog({ open, onStudy, onClose, you, ai, text }) {
13
- return (_jsx(Dialog, { open: open, title: text.study.title, onClose: onClose, text: text, children: _jsx(StudyForm, { onStudy: onStudy, you: you, ai: ai, text: text }) }));
14
- }
15
- /** The form, made again at each opening: the list read anew, empty, with no problem shown. */
16
- function StudyForm({ onStudy, you, ai, text }) {
17
- const words = text.study;
18
- const [pgn, setPgn] = useState("");
19
- const [problem, setProblem] = useState(undefined);
20
- const [sending, setSending] = useState(false);
21
- const analyses = useAnalyses();
22
- const study = (studied) => {
23
- setSending(true);
24
- void onStudy(studied).then((refused) => {
25
- setSending(false);
26
- setProblem(refused);
27
- });
28
- };
29
- const read = (file) => {
30
- void file?.text().then((read) => {
31
- setPgn(read);
32
- setProblem(undefined);
33
- });
34
- };
35
- return (_jsxs("form", { class: "profile-form study", onSubmit: (event) => {
36
- event.preventDefault();
37
- study({ pgn });
38
- }, children: [analyses.length === 0 ? null : (_jsxs("section", { class: "analyses", "aria-label": words.yours, children: [_jsx("h3", { children: words.yours }), _jsx("ul", { children: analyses.map((item) => (_jsx("li", { children: _jsxs("button", { type: "button", disabled: sending, onClick: () => study({ game: item.name }), children: [_jsx("b", { children: sidesNamed(item, you, ai, text) }), _jsx("span", { class: "result", children: item.result }), _jsx("span", { class: "note", children: [item.date, item.opening, words.moves(item.moves)].filter((part) => part !== undefined).join(" · ") }), _jsx("span", { class: item.reviewed ? "state reviewed" : "state", children: item.reviewed ? words.reviewed : words.unreviewed })] }) }, item.name))) }), _jsx("h3", { children: words.bring })] })), _jsxs("label", { class: "field", children: [_jsx("span", { children: words.paste }), _jsx("textarea", { rows: analyses.length === 0 ? 10 : 6, value: pgn, autofocus: true, spellcheck: false, placeholder: '[White "…"]\n[Black "…"]\n\n1. e4 e5 2. Nf3 …', onInput: (event) => {
39
- setPgn(event.currentTarget.value);
40
- setProblem(undefined);
41
- } })] }), _jsxs("label", { class: "field file", children: [_jsx("span", { children: words.file }), _jsx("input", { type: "file", accept: ".pgn,application/x-chess-pgn,text/plain", onChange: (event) => read(event.currentTarget.files?.[0]) })] }), _jsx("p", { class: "note", children: words.note }), problem === undefined ? null : _jsx("p", { class: "problem", role: "alert", children: problem }), _jsx("button", { class: "start", type: "submit", disabled: pgn.trim() === "" || sending, children: words.start })] }));
42
- }
43
- /** Who played a game listed, as its analysis names them: «Stefano – Opus 5.5 · xhigh». */
44
- function sidesNamed(item, you, ai, text) {
45
- const { white, black } = studiedSides({ White: item.white, Black: item.black }, you, item.aiModel === undefined ? ai : signature(item.aiModel.model, item.aiModel.effort), text.sides);
46
- return `${white.name} – ${black.name}`;
47
- }
48
- /** The analyses of the player's folder, read once the dialog opens; none while they come, or when the server cannot give them. */
49
- function useAnalyses() {
50
- const [analyses, setAnalyses] = useState([]);
51
- useEffect(() => {
52
- void fetch("/api/analyses")
53
- .then(async (response) => response.ok ? await response.json() : [])
54
- .catch(() => [])
55
- .then(setAnalyses);
56
- }, []);
57
- return analyses;
58
- }
@@ -1,17 +0,0 @@
1
- import { type AiModel, type GameRecord } from "../core/index.ts";
2
- /** An analysis as the page lists it: who played, with the AI's model (D-82), when, how it ended, its opening, how long, and whether the AI has reviewed it. */
3
- export interface AnalysisItem {
4
- readonly name: string;
5
- readonly white: string;
6
- readonly black: string;
7
- readonly aiModel?: AiModel;
8
- readonly date?: string;
9
- readonly result: string;
10
- readonly opening?: string;
11
- readonly moves: number;
12
- readonly reviewed: boolean;
13
- }
14
- /** The games to analyse in the profile in use, the latest 20: those kept to study and those played, reviewed or not. */
15
- export declare function analysesOf(home: string): AnalysisItem[];
16
- /** Whether the analyst has reviewed a game: its word on the whole game or on how it ended. The opponent's badges, given during the game with the helps on, are not a review (D-78). */
17
- export declare function isReviewed(record: GameRecord): boolean;
@@ -1,46 +0,0 @@
1
- // The analyses the page lists (T-106): the games brought to study and those played here, to analyse or open again on the board page.
2
- import { bookOpening } from "../commands/opening-book.js";
3
- import { aiModelIn, closingOf, gameReviewOf } from "../core/index.js";
4
- import { archivedGame, archivedGames, keptGame, keptGames } from "../games/index.js";
5
- import { gameFolder } from "../profiles/index.js";
6
- /** The games to analyse in the profile in use, the latest 20: those kept to study and those played, reviewed or not. */
7
- export function analysesOf(home) {
8
- const folder = gameFolder(home);
9
- const names = [...keptGames(folder), ...archivedGames(folder)].sort((one, other) => stampOf(other).localeCompare(stampOf(one))).slice(0, shown);
10
- return names.flatMap((name) => itemOf(name, () => name.startsWith("study/") ? keptGame(folder, name) : archivedGame(folder, name)));
11
- }
12
- // Enough for now; a longer list would load more as it scrolls.
13
- const shown = 20;
14
- /** Whether the analyst has reviewed a game: its word on the whole game or on how it ended. The opponent's badges, given during the game with the helps on, are not a review (D-78). */
15
- export function isReviewed(record) {
16
- return gameReviewOf(record) !== undefined || closingOf(record) !== undefined;
17
- }
18
- function itemOf(name, read) {
19
- let record;
20
- try {
21
- record = read();
22
- }
23
- catch {
24
- // A game that cannot be read stays out of the list.
25
- return [];
26
- }
27
- const { tags } = record;
28
- const date = tags.Date === undefined || tags.Date.includes("?") ? undefined : tags.Date;
29
- const opening = bookOpening(record)?.name;
30
- const aiModel = aiModelIn(record);
31
- return [{
32
- name,
33
- white: tags.White ?? "?",
34
- black: tags.Black ?? "?",
35
- ...(aiModel === undefined ? {} : { aiModel }),
36
- ...(date === undefined ? {} : { date }),
37
- result: tags.Result ?? "*",
38
- ...(opening === undefined ? {} : { opening }),
39
- moves: Math.ceil(record.moves.length / 2),
40
- reviewed: isReviewed(record),
41
- }];
42
- }
43
- /** The time in a game's name, which orders kept and played games together: 2026-11-04-153012. */
44
- function stampOf(name) {
45
- return /(\d{4}-\d{2}-\d{2}-\d{6})/.exec(name)?.[1] ?? "";
46
- }