chesspal 0.3.0 → 0.3.2
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.
- package/README.md +1 -1
- package/dist/cli/cli.js +6 -6
- package/dist/commands/{analyse-game.d.ts → analysis/analyse.d.ts} +2 -2
- package/dist/commands/{analyse-game.js → analysis/analyse.js} +7 -11
- package/dist/commands/{annotate-game.d.ts → analysis/annotate.d.ts} +1 -1
- package/dist/commands/{annotate-game.js → analysis/annotate.js} +6 -9
- package/dist/commands/{delete-review.d.ts → analysis/delete-review.d.ts} +1 -1
- package/dist/commands/{delete-review.js → analysis/delete-review.js} +5 -5
- package/dist/commands/analysis/index.d.ts +4 -0
- package/dist/commands/analysis/index.js +5 -0
- package/dist/commands/{study-games.d.ts → analysis/study-games.d.ts} +1 -1
- package/dist/commands/{study-games.js → analysis/study-games.js} +4 -5
- package/dist/commands/{agents.d.ts → answers/agents.d.ts} +3 -3
- package/dist/commands/{agents.js → answers/agents.js} +5 -5
- package/dist/commands/{clock.d.ts → answers/clock.d.ts} +2 -2
- package/dist/commands/{clock.js → answers/clock.js} +2 -2
- package/dist/commands/{drawings.d.ts → answers/drawings.d.ts} +1 -1
- package/dist/commands/{drawings.js → answers/drawings.js} +1 -1
- package/dist/commands/answers/index.d.ts +12 -0
- package/dist/commands/answers/index.js +14 -0
- package/dist/commands/{lead-input.d.ts → answers/lead-input.d.ts} +1 -1
- package/dist/commands/{lead-input.js → answers/lead-input.js} +1 -1
- package/dist/commands/{answer-lines.d.ts → answers/lines.d.ts} +2 -2
- package/dist/commands/{answer-lines.js → answers/lines.js} +4 -4
- package/dist/commands/{opening-book.d.ts → answers/opening-book.d.ts} +1 -1
- package/dist/commands/{opening-book.js → answers/opening-book.js} +3 -3
- package/dist/commands/{play-move.d.ts → answers/play-move.d.ts} +2 -2
- package/dist/commands/{play-move.js → answers/play-move.js} +3 -3
- package/dist/commands/{say.d.ts → answers/say.d.ts} +3 -3
- package/dist/commands/{say.js → answers/say.js} +4 -4
- package/dist/commands/{speech.js → answers/speech.js} +1 -1
- package/dist/commands/{study.d.ts → answers/study.d.ts} +3 -3
- package/dist/commands/{study.js → answers/study.js} +3 -3
- package/dist/commands/{game-summary.d.ts → answers/summary.d.ts} +2 -2
- package/dist/commands/{game-summary.js → answers/summary.js} +4 -4
- package/dist/commands/{view.d.ts → answers/view.d.ts} +1 -1
- package/dist/commands/{ai-move.d.ts → game/ai-move.d.ts} +2 -2
- package/dist/commands/{ai-move.js → game/ai-move.js} +6 -11
- package/dist/commands/{coach.d.ts → game/coach.d.ts} +1 -1
- package/dist/commands/{coach.js → game/coach.js} +7 -13
- package/dist/commands/{draw-offer.d.ts → game/draw-offer.d.ts} +1 -1
- package/dist/commands/{draw-offer.js → game/draw-offer.js} +4 -4
- package/dist/commands/{end-game.d.ts → game/end.d.ts} +2 -2
- package/dist/commands/{end-game.js → game/end.js} +5 -9
- package/dist/commands/{export-game.d.ts → game/export.d.ts} +1 -1
- package/dist/commands/{export-game.js → game/export.js} +4 -4
- package/dist/commands/game/index.d.ts +11 -0
- package/dist/commands/game/index.js +13 -0
- package/dist/commands/{levels.d.ts → game/levels.d.ts} +3 -3
- package/dist/commands/{levels.js → game/levels.js} +3 -3
- package/dist/commands/{look.d.ts → game/look.d.ts} +3 -4
- package/dist/commands/{look.js → game/look.js} +5 -10
- package/dist/commands/{new-game.d.ts → game/new.d.ts} +3 -4
- package/dist/commands/{new-game.js → game/new.js} +17 -13
- package/dist/commands/{page-link.d.ts → game/page-link.d.ts} +1 -1
- package/dist/commands/{player-move.d.ts → game/player-move.d.ts} +2 -2
- package/dist/commands/{player-move.js → game/player-move.js} +4 -8
- package/dist/commands/{ponder.d.ts → game/ponder.d.ts} +3 -3
- package/dist/commands/{ponder.js → game/ponder.js} +6 -9
- package/dist/commands/{position.d.ts → game/position.d.ts} +2 -2
- package/dist/commands/{position.js → game/position.js} +5 -7
- package/dist/commands/{status.d.ts → game/status.d.ts} +2 -4
- package/dist/commands/{status.js → game/status.js} +12 -17
- package/dist/commands/index.d.ts +6 -17
- package/dist/commands/index.js +11 -38
- package/dist/commands/{delete-game.d.ts → profiles/delete-game.d.ts} +1 -1
- package/dist/commands/{delete-game.js → profiles/delete-game.js} +3 -3
- package/dist/commands/profiles/index.d.ts +4 -0
- package/dist/commands/profiles/index.js +5 -0
- package/dist/commands/{past-games.d.ts → profiles/past-games.d.ts} +1 -1
- package/dist/commands/{past-games.js → profiles/past-games.js} +5 -5
- package/dist/commands/{profiles.d.ts → profiles/profiles.d.ts} +7 -7
- package/dist/commands/{profiles.js → profiles/profiles.js} +4 -4
- package/dist/commands/{ratings.d.ts → profiles/ratings.d.ts} +1 -1
- package/dist/commands/{ratings.js → profiles/ratings.js} +2 -2
- package/dist/commands/{context.d.ts → registry/context.d.ts} +2 -0
- package/dist/commands/{context.js → registry/context.js} +2 -2
- package/dist/commands/registry/index.d.ts +2 -0
- package/dist/commands/registry/index.js +3 -0
- package/dist/commands/setup/index.d.ts +2 -0
- package/dist/commands/setup/index.js +3 -0
- package/dist/commands/{init.d.ts → setup/init.d.ts} +1 -1
- package/dist/commands/{init.js → setup/init.js} +2 -3
- package/dist/commands/{instructions.d.ts → setup/instructions.d.ts} +2 -2
- package/dist/commands/{instructions.js → setup/instructions.js} +3 -3
- package/dist/commands/{ai-say.d.ts → talk/ai-say.d.ts} +2 -3
- package/dist/commands/{ai-say.js → talk/ai-say.js} +5 -9
- package/dist/commands/talk/index.d.ts +2 -0
- package/dist/commands/talk/index.js +3 -0
- package/dist/commands/{player-say.d.ts → talk/player-say.d.ts} +1 -1
- package/dist/commands/{player-say.js → talk/player-say.js} +4 -4
- package/dist/page/app/app.js +44 -20
- package/dist/page/app/served.js +7 -0
- package/dist/page/avatars/torretta.js +10 -3
- package/dist/page/dialogs/dialogs.css +10 -0
- package/dist/page/dialogs/profiles.js +3 -7
- package/dist/page/dialogs/settings.js +18 -4
- package/dist/page/game/column.js +1 -1
- package/dist/page/game/game.css +1 -1
- package/dist/page/guide/blocks.js +13 -2
- package/dist/page/guide/credits.js +6 -0
- package/dist/page/guide/drawings/analysis.js +13 -0
- package/dist/page/guide/drawings/drawings.css +329 -0
- package/dist/page/guide/drawings/drawings.js +15 -0
- package/dist/page/guide/drawings/game.js +15 -0
- package/dist/page/guide/drawings/helps.js +13 -0
- package/dist/page/guide/drawings/how-it-works.js +13 -0
- package/dist/page/guide/drawings/parts.js +103 -0
- package/dist/page/guide/drawings/players.js +19 -0
- package/dist/page/guide/drawings/talk.js +9 -0
- package/dist/page/guide/en.md +39 -25
- package/dist/page/guide/guide.css +123 -91
- package/dist/page/guide/guide.js +47 -25
- package/dist/page/guide/it.md +39 -25
- package/dist/page/guide/markdown.js +5 -0
- package/dist/page/helps/helps.css +127 -83
- package/dist/page/helps/helps.js +45 -26
- package/dist/page/helps/view.js +13 -3
- package/dist/page/{guide/foot.js → layout/footer.js} +7 -8
- package/dist/page/layout/header.js +5 -3
- package/dist/page/layout/layout.css +114 -36
- package/dist/page/layout/window.js +6 -26
- package/dist/page/main.js +1 -1
- package/dist/page/pieces/pieces.js +5 -2
- package/dist/page/style.css +2 -1
- package/dist/page/table/table.css +192 -0
- package/dist/page/table/update.js +82 -0
- package/dist/page/table/window.js +130 -0
- package/dist/page/talk/chat.css +19 -8
- package/dist/page/talk/talk.css +17 -67
- package/dist/page/talk/talk.js +7 -7
- package/dist/page/talk/voice.js +47 -9
- package/dist/page/text.js +118 -22
- package/dist/page/theme.css +2 -0
- package/dist/server/{bell.js → bell/bell.js} +3 -3
- package/dist/server/bell/index.d.ts +1 -0
- package/dist/server/bell/index.js +2 -0
- package/dist/server/{caller.d.ts → mcp/caller.d.ts} +1 -1
- package/dist/server/{caller.js → mcp/caller.js} +1 -1
- package/dist/server/mcp/index.d.ts +1 -0
- package/dist/server/mcp/index.js +2 -0
- package/dist/server/{mcp.d.ts → mcp/mcp.d.ts} +1 -1
- package/dist/server/{mcp.js → mcp/mcp.js} +9 -9
- package/dist/server/page/chat.d.ts +5 -0
- package/dist/server/page/chat.js +9 -1
- package/dist/server/page/game.js +16 -3
- package/dist/server/page/http.d.ts +1 -1
- package/dist/server/page/index.d.ts +3 -0
- package/dist/server/page/index.js +3 -0
- package/dist/server/page/page.d.ts +16 -3
- package/dist/server/page/page.js +18 -4
- package/dist/server/page/table.d.ts +40 -15
- package/dist/server/page/table.js +203 -19
- package/dist/server/page/update.d.ts +18 -0
- package/dist/server/page/update.js +40 -0
- package/dist/server/table/browser.d.ts +1 -1
- package/dist/server/table/browser.js +1 -1
- package/dist/server/table/hosts/chats.d.ts +1 -1
- package/dist/server/table/hosts/chats.js +7 -4
- package/dist/server/table/hosts/index.d.ts +1 -1
- package/dist/server/table/hosts/index.js +1 -1
- package/dist/server/table/hosts/play.d.ts +15 -4
- package/dist/server/table/hosts/play.js +75 -11
- package/dist/server/table/hosts/seat.d.ts +17 -5
- package/dist/server/table/hosts/seat.js +21 -15
- package/dist/server/table/index.d.ts +3 -2
- package/dist/server/table/index.js +3 -2
- package/dist/server/table/launch.d.ts +5 -2
- package/dist/server/table/launch.js +6 -3
- package/dist/server/table/link.d.ts +1 -1
- package/dist/server/table/link.js +4 -3
- package/dist/server/table/table.d.ts +4 -5
- package/dist/server/table/table.js +15 -12
- package/dist/server/table/update.d.ts +17 -0
- package/dist/server/table/update.js +77 -0
- package/dist/sites/index.d.ts +1 -1
- package/dist/sites/index.js +2 -2
- package/dist/version.d.ts +4 -0
- package/dist/version.js +12 -1
- package/package.json +1 -1
- package/dist/page/table/opener.css +0 -65
- package/dist/page/table/opener.js +0 -59
- /package/dist/commands/{speech.d.ts → answers/speech.d.ts} +0 -0
- /package/dist/commands/{view.js → answers/view.js} +0 -0
- /package/dist/commands/{page-link.js → game/page-link.js} +0 -0
- /package/dist/commands/{registry.d.ts → registry/registry.d.ts} +0 -0
- /package/dist/commands/{registry.js → registry/registry.js} +0 -0
- /package/dist/server/{bell.d.ts → bell/bell.d.ts} +0 -0
package/dist/page/guide/en.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Chesspal: the guide
|
|
2
2
|
|
|
3
|
-
With **Chesspal** you play chess against an **AI**, on a real board
|
|
3
|
+
With **Chesspal** you play chess against an **AI**, on a real board, and learn with it. This guide is for players: you do not need to know how to program.
|
|
4
4
|
|
|
5
5
|
## How it works
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
7
9
|
| Who | What they do |
|
|
8
10
|
|---|---|
|
|
9
11
|
| **You** | You move on the board and talk with the AI. |
|
|
@@ -14,53 +16,65 @@ There are two windows: this **page**, with the board, and the AI's **chat**, in
|
|
|
14
16
|
|
|
15
17
|
No chess engine plays for the AI: every move and every judgment is its own. Chesspal checks that each move is legal and tells the AI what is on the board: the pieces attacked and defended, the pins, the opening's name.
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
1. Install **Node.js** from [nodejs.org](https://nodejs.org), the recommended (LTS) version, and an AI with your own subscription: **Claude Code** or **Codex**.
|
|
20
|
-
2. Open a terminal, the window where you type commands (on Windows, Command Prompt: press Start, type `cmd`, press Enter; on macOS, Terminal), and type `npm install -g chesspal`, then `chesspal`: this page opens. The first time it offers an icon on your desktop, to open it with a double click.
|
|
21
|
-
3. Press **Claude Code** or **Codex**: the AI's chat opens in a window of its own. Keep it open while you play.
|
|
22
|
-
4. Press **New game**, choose your colour, the clock and the AI's level, and press **Start**.
|
|
23
|
-
|
|
24
|
-
## If you are lost
|
|
25
|
-
|
|
26
|
-
- **The AI does not answer**: look at its window. If it is asking you something, answer there; if you closed it, press **Claude Code** or **Codex** again.
|
|
27
|
-
- **The page does not open**: double-click Chesspal's icon, or open it as in the [Quick start](#quick-start).
|
|
28
|
-
- **Your games** are in a folder on your computer: **Who's playing?**, from your picture at the top right, shows where, and **Open the folder** opens it.
|
|
19
|
+
### Getting started
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- You talk with the AI in the box under its name, a few words with each move: it reads them with your move. You can also write to it in its window.
|
|
34
|
-
- A **move written** in the chat counts too: `e4`, `Nf3`, with the English letters of the pieces (K Q R B N), or in words.
|
|
35
|
-
- At each **new game**, the chat the page opened starts again clean by itself, once the AI has stopped thinking: a long chat makes the AI slower.
|
|
21
|
+
1. Click the **AI's name**, at the top left, and choose its chat among those on your computer: **Claude Code** or **Codex**. It opens in a window of its own: keep it open while you play.
|
|
22
|
+
2. Press **New game**, choose your colour, the clock and the AI's level, and press **Start**.
|
|
23
|
+
3. Move: the AI answers on the board, and with a few words under its name.
|
|
36
24
|
|
|
37
25
|
## The game
|
|
38
26
|
|
|
27
|
+

|
|
28
|
+
|
|
39
29
|
- **Move** by dragging a piece, or by clicking the piece and then its square. The dots show the legal moves; when a move is not allowed, the page says why.
|
|
40
30
|
- **The clock**, if you chose one, starts with **Start**. The AI has its own and knows how much time it has left.
|
|
41
31
|
- **Offer a draw** on your turn, once each side has moved; **Resign** ends the game.
|
|
42
|
-
- **The helps**: with "The AI teaches as you play", in the settings, the **Helps** card shows the pieces in danger, the pins and the pawns, and the AI, as your coach, gives you an idea. The AI draws coloured arrows on the board: the **?** beside the moves explains every mark.
|
|
43
32
|
- **Flip** turns the board round; **PGN** saves the moves in the file every chess site reads, to open on Lichess or Chess.com.
|
|
44
33
|
|
|
34
|
+
## Talking with the AI
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
- You talk with the AI in the **box under its name**, a few words with each move: it reads them with your move. You can also write to it in its window.
|
|
39
|
+
- A **move written** in the chat counts too: `e4`, `Nf3`, with the English letters of the pieces (K Q R B N), or in words.
|
|
40
|
+
- **The AI's name** opens the choice of its chat: Claude Code or Codex, the model (which AI: some are faster, others stronger) and how much it reasons. The more it reasons, the slower it plays. If you change them, the chat starts afresh in the same window: the AI forgets what you talked about, and the game stays as it is.
|
|
41
|
+
- At each **new game**, the chat the page opened starts afresh by itself, once the AI has stopped thinking: a long chat makes the AI slower.
|
|
42
|
+
|
|
43
|
+
## Helps and marks
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
- With **"The AI teaches as you play"**, in the settings, the **Helps** card shows the pieces in danger, the pins and the pawns, and the AI, as your coach, gives you an idea.
|
|
48
|
+
- The AI draws **coloured arrows** on the board: the **?** beside the moves explains every mark.
|
|
49
|
+
- In the review, a **badge** on a move gives the AI's judgment: a great move, an inaccuracy, a blunder.
|
|
50
|
+
|
|
45
51
|
## Review and analysis
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
- When the game is over, press **Analyse the game**: the AI goes over it and puts its judgments and notes on the moves. Read them by stepping through the moves with the arrows at the foot of the column, or by clicking a move.
|
|
48
56
|
- **Analyses**, in the header, opens your analyses, and loads a game played elsewhere: paste its PGN, or choose a .pgn file.
|
|
49
57
|
- Ask the AI about the game in the box under its name.
|
|
50
58
|
- **Annotated PGN** saves the game with its comments.
|
|
51
59
|
|
|
52
60
|
## Players and profile
|
|
53
61
|
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+

|
|
63
|
+
|
|
64
|
+
- **Who's playing?**: your picture at the top right, or your name beside the board, opens the list of the players: there you choose one or add one. Each has their own games and settings.
|
|
65
|
+
- **Your profile**: in **Who's playing?**, the pencil beside your name changes your picture, your name, how you play, your names on Lichess and Chess.com and your FIDE rating.
|
|
56
66
|
- **Your rating**: from your names there, Chesspal reads your public rating, the one of your rapid games if you play them, and tells the AI. No passwords: anyone can see that rating on the site. Without a name there, the AI knows how you play from **How do you play?**
|
|
57
67
|
- **Your FIDE rating**, if you play tournaments, you type yourself: no site gives it to Chesspal. The AI reads it beside the site's, each on its own.
|
|
58
68
|
- If you load a game played on Lichess or Chess.com, Chesspal knows which colour you played.
|
|
59
69
|
|
|
60
70
|
## Questions and problems
|
|
61
71
|
|
|
62
|
-
- **The AI
|
|
72
|
+
- **The AI does not answer, and its clock runs**: look at its window, which may have gone behind the others: find it in the bar at the bottom. If it is asking you something, answer there; if you closed it, click the AI's name and open another.
|
|
73
|
+
- **The AI is slow**: it really thinks over each move. From its name, choose a faster model, or less reasoning.
|
|
74
|
+
- **A piece does not move**: it is not your turn, or the move is not allowed; the page says why.
|
|
75
|
+
- **Closed the page?** Open it again from Chesspal's icon, on the desktop or in the menu: the game you left halfway is still there.
|
|
76
|
+
- **Your games** are in a folder on your computer: **Who's playing?**, from your picture at the top right, shows where, and **Open the folder** opens it. For a backup copy it, with the chat and the page closed.
|
|
77
|
+
- **A new version of Chesspal**: an arrow at the top tells you, and installs it between games.
|
|
63
78
|
- **What it costs**: Chesspal is free; the AI uses your own subscription, and you pay nothing more.
|
|
64
79
|
- **Can the AI play an illegal move?** No: Chesspal checks every move. Its judgments are its own, though, and an AI can be wrong, like a person.
|
|
65
|
-
- **A backup**: copy the folder of your games, with the chat and the page closed.
|
|
66
80
|
- **Something does not work?** Tell us on [GitHub](https://github.com/stefanocaronia/chesspal/issues): what you did, what you expected, what happened. GitHub is the site where Chesspal is made: you write there with a free account, and anyone can read it.
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
/* The guide: a
|
|
1
|
+
/* The guide: a wide dialog, the index of its pages beside the page shown, and at the dialog's foot, on every page, the arrows to the one before and after
|
|
2
|
+
(Zoe) */
|
|
2
3
|
|
|
3
4
|
.dialog:has(> .guide) {
|
|
5
|
+
width: min(900px, calc(100vw - 32px));
|
|
4
6
|
height: calc(100vh - 48px);
|
|
5
7
|
max-height: 90vh;
|
|
6
8
|
}
|
|
7
9
|
|
|
10
|
+
/* As tall as the dialog under its title, so that a short page keeps its arrows at the foot */
|
|
8
11
|
.guide {
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: 200px minmax(0, 1fr);
|
|
14
|
+
gap: 28px;
|
|
15
|
+
align-items: start;
|
|
16
|
+
min-height: calc(100% - 60px);
|
|
9
17
|
font-size: 14px;
|
|
10
18
|
line-height: 1.55;
|
|
11
19
|
}
|
|
@@ -36,76 +44,69 @@
|
|
|
36
44
|
font-size: 13px;
|
|
37
45
|
}
|
|
38
46
|
|
|
39
|
-
/* A heading a
|
|
47
|
+
/* A heading a link brings into sight stays under the dialog's own title */
|
|
40
48
|
.guide [id] {
|
|
41
49
|
scroll-margin-top: 64px;
|
|
42
50
|
}
|
|
43
51
|
|
|
52
|
+
/* The index: the pages' titles, the one shown marked by a bar at its start; it stays in sight while the page scrolls */
|
|
44
53
|
.guide-index {
|
|
54
|
+
position: sticky;
|
|
55
|
+
top: 60px;
|
|
45
56
|
display: flex;
|
|
46
|
-
flex-
|
|
47
|
-
gap:
|
|
48
|
-
margin: 4px
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 2px;
|
|
59
|
+
margin-top: 4px;
|
|
49
60
|
}
|
|
50
61
|
|
|
51
62
|
.guide-chip {
|
|
52
63
|
min-height: 32px;
|
|
53
|
-
padding:
|
|
54
|
-
border:
|
|
55
|
-
border-radius:
|
|
56
|
-
background:
|
|
57
|
-
color: var(--
|
|
64
|
+
padding: 6px 12px;
|
|
65
|
+
border: 0;
|
|
66
|
+
border-radius: 0 8px 8px 0;
|
|
67
|
+
background: none;
|
|
68
|
+
color: var(--soft);
|
|
58
69
|
font: inherit;
|
|
59
|
-
font-size:
|
|
70
|
+
font-size: 13.5px;
|
|
71
|
+
text-align: start;
|
|
72
|
+
cursor: pointer;
|
|
60
73
|
}
|
|
61
74
|
|
|
62
75
|
.guide-chip:hover {
|
|
63
|
-
|
|
64
|
-
color: var(--accent);
|
|
76
|
+
color: var(--ink);
|
|
65
77
|
}
|
|
66
78
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
.guide-chip[aria-current="page"] {
|
|
80
|
+
background: var(--quote);
|
|
81
|
+
box-shadow: inset 3px 0 0 var(--accent);
|
|
82
|
+
color: var(--ink);
|
|
83
|
+
font-weight: 600;
|
|
70
84
|
}
|
|
71
85
|
|
|
72
|
-
.guide-
|
|
86
|
+
.guide-page {
|
|
73
87
|
display: flex;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
padding: 10px 0;
|
|
77
|
-
cursor: pointer;
|
|
78
|
-
list-style: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.guide-part summary::-webkit-details-marker {
|
|
82
|
-
display: none;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
align-self: stretch;
|
|
83
90
|
}
|
|
84
91
|
|
|
85
|
-
|
|
86
|
-
.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
height: 7px;
|
|
90
|
-
border-right: 1.7px solid var(--soft);
|
|
91
|
-
border-bottom: 1.7px solid var(--soft);
|
|
92
|
-
transform: rotate(-45deg);
|
|
93
|
-
transition: transform 0.15s;
|
|
92
|
+
/* The page's text grows to push the arrows to the foot */
|
|
93
|
+
.guide-text {
|
|
94
|
+
flex: 1 0 auto;
|
|
95
|
+
margin-bottom: 22px;
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
.guide-part h3 {
|
|
102
|
-
margin: 0;
|
|
103
|
-
font-size: 16px;
|
|
98
|
+
/* The page's title takes the focus when the page turns, for a screen reader: no ring, since no key brought it there */
|
|
99
|
+
.guide-page h3 {
|
|
100
|
+
margin: 4px 0 12px;
|
|
101
|
+
font-size: 19px;
|
|
104
102
|
font-weight: 600;
|
|
103
|
+
outline: none;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
|
-
.guide-
|
|
108
|
-
|
|
106
|
+
.guide-page h4 {
|
|
107
|
+
margin: 16px 0 6px;
|
|
108
|
+
font-size: 15px;
|
|
109
|
+
font-weight: 600;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
.guide-table {
|
|
@@ -125,68 +126,99 @@
|
|
|
125
126
|
vertical-align: top;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
/* The
|
|
129
|
-
.guide-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
/* The arrows to the page before and after, each with its title: at the foot of a short page, and at the dialog's foot over a long one */
|
|
130
|
+
.guide-turn {
|
|
131
|
+
position: sticky;
|
|
132
|
+
bottom: 0;
|
|
133
|
+
display: flex;
|
|
134
|
+
gap: 12px;
|
|
135
|
+
padding: 14px 0 4px;
|
|
134
136
|
border-top: 1px solid var(--line);
|
|
135
|
-
|
|
136
|
-
font-size: 12.5px;
|
|
137
|
-
text-align: center;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.guide-foot p {
|
|
141
|
-
margin: 0;
|
|
137
|
+
background: var(--card);
|
|
142
138
|
}
|
|
143
139
|
|
|
144
|
-
.
|
|
145
|
-
display: flex;
|
|
146
|
-
flex-wrap: wrap;
|
|
140
|
+
.guide-turn button {
|
|
141
|
+
display: inline-flex;
|
|
147
142
|
align-items: center;
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
gap: 6px;
|
|
144
|
+
min-height: 36px;
|
|
145
|
+
padding: 6px 12px;
|
|
146
|
+
border: 1px solid var(--line);
|
|
147
|
+
border-radius: 8px;
|
|
148
|
+
background: var(--card);
|
|
149
|
+
color: var(--ink);
|
|
150
|
+
font: inherit;
|
|
151
|
+
font-size: 13.5px;
|
|
152
|
+
cursor: pointer;
|
|
150
153
|
}
|
|
151
154
|
|
|
152
|
-
.guide
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
gap: 5px;
|
|
156
|
-
color: inherit;
|
|
157
|
-
text-decoration: none;
|
|
155
|
+
.guide-turn button:hover {
|
|
156
|
+
border-color: var(--accent);
|
|
157
|
+
color: var(--accent);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.guide .
|
|
161
|
-
|
|
162
|
-
color: var(--ink);
|
|
160
|
+
.guide-turn .next {
|
|
161
|
+
margin-inline-start: auto;
|
|
163
162
|
}
|
|
164
163
|
|
|
165
|
-
.
|
|
164
|
+
.guide-turn .icon {
|
|
166
165
|
width: 16px;
|
|
167
166
|
height: 16px;
|
|
168
|
-
|
|
167
|
+
fill: none;
|
|
168
|
+
stroke: currentColor;
|
|
169
|
+
stroke-width: 2;
|
|
170
|
+
stroke-linecap: round;
|
|
171
|
+
stroke-linejoin: round;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* On a narrow screen the index is one row of chips over the page, scrolled sideways, its end fading where more follow; the arrows share the page's
|
|
175
|
+
width at its foot, each title by its arrow */
|
|
176
|
+
@media (max-width: 640px) {
|
|
177
|
+
.guide {
|
|
178
|
+
grid-template-columns: minmax(0, 1fr);
|
|
179
|
+
grid-template-rows: auto 1fr;
|
|
180
|
+
gap: 14px;
|
|
181
|
+
}
|
|
169
182
|
|
|
170
|
-
.
|
|
171
|
-
|
|
172
|
-
|
|
183
|
+
.guide-index {
|
|
184
|
+
position: static;
|
|
185
|
+
flex-direction: row;
|
|
186
|
+
gap: 6px;
|
|
187
|
+
overflow-x: auto;
|
|
188
|
+
scrollbar-width: none;
|
|
189
|
+
mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
|
|
190
|
+
}
|
|
173
191
|
|
|
174
|
-
.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
gap: 6px;
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
list-style: none;
|
|
180
|
-
}
|
|
192
|
+
.guide-index::-webkit-scrollbar {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
181
195
|
|
|
182
|
-
.
|
|
183
|
-
|
|
184
|
-
|
|
196
|
+
.guide-chip {
|
|
197
|
+
flex: none;
|
|
198
|
+
border: 1px solid var(--line);
|
|
199
|
+
border-radius: 999px;
|
|
200
|
+
font-size: 13px;
|
|
201
|
+
white-space: nowrap;
|
|
202
|
+
}
|
|
185
203
|
|
|
186
|
-
.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
204
|
+
.guide-chip[aria-current="page"] {
|
|
205
|
+
box-shadow: none;
|
|
206
|
+
border-color: var(--accent);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.guide-turn {
|
|
210
|
+
position: static;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.guide-turn button {
|
|
214
|
+
flex: 1 1 0;
|
|
215
|
+
min-width: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.guide-turn .next {
|
|
219
|
+
justify-content: flex-end;
|
|
220
|
+
text-align: end;
|
|
221
|
+
}
|
|
190
222
|
}
|
|
191
223
|
|
|
192
224
|
@media (max-width: 600px) {
|
package/dist/page/guide/guide.js
CHANGED
|
@@ -1,41 +1,63 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
-
// The guide, from the book in the header: how to play, in the page's language (guide/<code>.md),
|
|
3
|
-
//
|
|
4
|
-
import { useEffect, useMemo, useState } from "preact/hooks";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
// The guide, from the book in the header: how to play, in the page's language (guide/<code>.md), a page at a time, chosen in its index or with the arrows at
|
|
3
|
+
// its foot, the credits the last; its anchors are the English guide's, so that a link finds its heading in both languages.
|
|
4
|
+
import { useEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
5
5
|
import { Dialog } from "../dialogs/dialog.js";
|
|
6
6
|
import { anchorOf, markdownBlocks } from "./blocks.js";
|
|
7
|
-
import {
|
|
8
|
-
import { Blocks
|
|
7
|
+
import { GuideCredits } from "./credits.js";
|
|
8
|
+
import { Blocks } from "./markdown.js";
|
|
9
9
|
/** The guide in its dialog. */
|
|
10
10
|
export function GuideDialog({ open, onClose, text }) {
|
|
11
11
|
return (_jsx(Dialog, { open: open, title: text.guide.title, onClose: onClose, text: text, children: _jsx(Guide, { text: text }) }));
|
|
12
12
|
}
|
|
13
13
|
function Guide({ text }) {
|
|
14
|
+
const words = text.guide;
|
|
14
15
|
const guide = useGuide(text.language);
|
|
15
|
-
const
|
|
16
|
+
const { lead, pages, anchors } = useMemo(() => guidePages(guide.own, guide.english), [guide]);
|
|
17
|
+
const [shown, setShown] = useState(0);
|
|
18
|
+
// The heading to bring into sight once its page is drawn: "" for the page's top.
|
|
16
19
|
const [sought, setSought] = useState();
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
const top = useRef(null);
|
|
21
|
+
const title = useRef(null);
|
|
22
|
+
const titles = [...pages.map((page) => page.heading.text), words.credits];
|
|
23
|
+
const page = pages[shown];
|
|
24
|
+
const show = (index, id = "") => {
|
|
25
|
+
setShown(index);
|
|
26
|
+
setSought(id);
|
|
21
27
|
};
|
|
22
|
-
// A
|
|
23
|
-
const go = (
|
|
24
|
-
const
|
|
28
|
+
// A link to a heading shows its page, and the heading in it.
|
|
29
|
+
const go = (anchor) => {
|
|
30
|
+
const id = idOf(anchor);
|
|
31
|
+
const index = pages.findIndex((one) => [one.heading, ...one.blocks].some((block) => anchors.get(block) === id));
|
|
25
32
|
if (index >= 0) {
|
|
26
|
-
|
|
27
|
-
setSought(id);
|
|
33
|
+
show(index, id);
|
|
28
34
|
}
|
|
29
35
|
};
|
|
30
|
-
|
|
36
|
+
// A page turned: its chip in sight in the index, the focus on its title, which a screen reader says, and its top or the heading sought in sight.
|
|
31
37
|
useEffect(() => {
|
|
32
38
|
if (sought === undefined) {
|
|
33
39
|
return;
|
|
34
40
|
}
|
|
35
41
|
setSought(undefined);
|
|
36
|
-
|
|
42
|
+
top.current?.querySelector(".guide-chip[aria-current]")?.scrollIntoView({ inline: "center", block: "nearest" });
|
|
43
|
+
title.current?.focus({ preventScroll: true });
|
|
44
|
+
const heading = sought === "" ? null : document.getElementById(sought);
|
|
45
|
+
if (heading === null) {
|
|
46
|
+
top.current?.closest("dialog")?.scrollTo({ top: 0 });
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
heading.scrollIntoView({ block: "start" });
|
|
50
|
+
}
|
|
37
51
|
}, [sought]);
|
|
38
|
-
|
|
52
|
+
if (pages.length === 0) {
|
|
53
|
+
return _jsx("div", { class: "guide", ref: top });
|
|
54
|
+
}
|
|
55
|
+
return (_jsxs("div", { class: "guide", ref: top, children: [_jsx("nav", { class: "guide-index", "aria-label": words.contents, children: titles.map((title, index) => (_jsx("button", { type: "button", class: "guide-chip", "aria-current": index === shown ? "page" : undefined, onClick: () => show(index), children: title }, title))) }), _jsxs("article", { class: "guide-page", children: [_jsxs("div", { class: "guide-text", children: [_jsx("h3", { id: page === undefined ? undefined : anchors.get(page.heading), ref: title, tabIndex: -1, children: titles[shown] }), page === undefined ? _jsx(GuideCredits, { text: text }) : (_jsxs(_Fragment, { children: [shown === 0 ? _jsx(Blocks, { blocks: lead, anchors: anchors, go: go }) : null, _jsx(Blocks, { blocks: page.blocks, anchors: anchors, go: go })] }))] }), _jsxs("div", { class: "guide-turn", children: [shown === 0 ? null : _jsx(TurnButton, { back: true, title: titles[shown - 1] ?? "", label: words.previous, onTurn: () => show(shown - 1) }), shown === titles.length - 1 ? null : _jsx(TurnButton, { title: titles[shown + 1] ?? "", label: words.next, onTurn: () => show(shown + 1) })] })] })] }));
|
|
56
|
+
}
|
|
57
|
+
/** An arrow at a page's foot, with the title of the page it shows. */
|
|
58
|
+
function TurnButton({ back = false, title, label, onTurn }) {
|
|
59
|
+
const arrow = (_jsx("svg", { class: "icon", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: back ? "M14.5 6L8.5 12L14.5 18" : "M9.5 6L15.5 12L9.5 18" }) }));
|
|
60
|
+
return (_jsxs("button", { type: "button", class: back ? "back" : "next", "aria-label": `${label}: ${title}`, onClick: onTurn, children: [back ? arrow : null, title, back ? null : arrow] }));
|
|
39
61
|
}
|
|
40
62
|
/** The guide in a language, and in English for its anchors; empty until they are read. */
|
|
41
63
|
function useGuide(language) {
|
|
@@ -63,8 +85,8 @@ function guideIn(language) {
|
|
|
63
85
|
return "";
|
|
64
86
|
});
|
|
65
87
|
}
|
|
66
|
-
/** The guide's lead, the lines before its first
|
|
67
|
-
function
|
|
88
|
+
/** The guide's lead, the lines before its first page, its title aside; its pages; and each heading's anchor, the English one at its place. */
|
|
89
|
+
function guidePages(own, english) {
|
|
68
90
|
const blocks = markdownBlocks(own);
|
|
69
91
|
const headings = blocks.filter((block) => block.kind === "heading");
|
|
70
92
|
const englishHeadings = markdownBlocks(english).filter((block) => block.kind === "heading");
|
|
@@ -72,16 +94,16 @@ function guideParts(own, english) {
|
|
|
72
94
|
const anchors = new Map(headings.map((heading, index) => [heading, idOf(anchorOf((sameShape ? englishHeadings[index] : heading)?.text ?? heading.text))]));
|
|
73
95
|
const first = blocks.findIndex((block) => block.kind === "heading" && block.level === 2);
|
|
74
96
|
const lead = (first < 0 ? blocks : blocks.slice(0, first)).filter((block) => !(block.kind === "heading" && block.level === 1));
|
|
75
|
-
const
|
|
97
|
+
const pages = [];
|
|
76
98
|
for (const block of first < 0 ? [] : blocks.slice(first)) {
|
|
77
99
|
if (block.kind === "heading" && block.level === 2) {
|
|
78
|
-
|
|
100
|
+
pages.push({ heading: block, blocks: [] });
|
|
79
101
|
}
|
|
80
102
|
else {
|
|
81
|
-
|
|
103
|
+
pages.at(-1)?.blocks.push(block);
|
|
82
104
|
}
|
|
83
105
|
}
|
|
84
|
-
return { lead,
|
|
106
|
+
return { lead, pages, anchors };
|
|
85
107
|
}
|
|
86
108
|
// A heading's id on the page, apart from the page's own.
|
|
87
109
|
function idOf(anchor) {
|
package/dist/page/guide/it.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Chesspal: la guida
|
|
2
2
|
|
|
3
|
-
Con **Chesspal** giochi a scacchi contro un'**AI**, su una scacchiera vera
|
|
3
|
+
Con **Chesspal** giochi a scacchi contro un'**AI**, su una scacchiera vera, e impari con lei. Questa guida è per chi gioca: non serve saper programmare.
|
|
4
4
|
|
|
5
5
|
## Come funziona
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
7
9
|
| Chi | Cosa fa |
|
|
8
10
|
|---|---|
|
|
9
11
|
| **Tu** | Muovi sulla scacchiera e parli con l'AI. |
|
|
@@ -14,53 +16,65 @@ Le finestre sono due: questa **pagina**, con la scacchiera, e la **chat** dell'A
|
|
|
14
16
|
|
|
15
17
|
Nessun motore di scacchi gioca al posto dell'AI: ogni mossa e ogni giudizio sono suoi. Chesspal controlla che ogni mossa sia legale e dice all'AI cosa c'è sulla scacchiera: i pezzi attaccati e difesi, le inchiodature, il nome dell'apertura.
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
1. Installa **Node.js** da [nodejs.org](https://nodejs.org), la versione consigliata (LTS), e un'AI col tuo abbonamento: **Claude Code** o **Codex**.
|
|
20
|
-
2. Apri un terminale, la finestra dove si scrivono i comandi (su Windows il Prompt dei comandi: tasto Start, scrivi `cmd`, Invio; su macOS il Terminale), e scrivi `npm install -g chesspal`, poi `chesspal`: si apre questa pagina. La prima volta ti propone un'icona sul desktop, per aprirla con un doppio clic.
|
|
21
|
-
3. Premi **Claude Code** o **Codex**: la chat dell'AI si apre in una finestra sua. Tienila aperta mentre giochi.
|
|
22
|
-
4. Premi **Nuova partita**, scegli il colore, l'orologio e il livello dell'AI, e premi **Inizia**.
|
|
23
|
-
|
|
24
|
-
## Se ti sei perso
|
|
25
|
-
|
|
26
|
-
- **L'AI non risponde**: guarda la sua finestra. Se ti sta chiedendo qualcosa, rispondi lì; se l'hai chiusa, premi di nuovo **Claude Code** o **Codex**.
|
|
27
|
-
- **La pagina non si apre**: fai doppio clic sull'icona di Chesspal, o aprila come nell'[Avvio rapido](#quick-start).
|
|
28
|
-
- **Le tue partite** stanno in una cartella sul tuo computer: **Chi gioca?**, dalla tua immagine in alto a destra, dice dove, e **Apri la cartella** la apre.
|
|
19
|
+
### Per cominciare
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- Parli con l'AI nella casella sotto il suo nome, qualche parola a ogni mossa: le legge con la tua mossa. Puoi scriverle anche nella sua finestra.
|
|
34
|
-
- Anche una **mossa scritta** nella chat vale: `e4`, `Nf3`, con le lettere inglesi dei pezzi (K Q R B N), o a parole.
|
|
35
|
-
- A ogni **nuova partita** la chat aperta dalla pagina riparte pulita da sola, se l'AI ha finito di pensare: una chat lunga rende l'AI più lenta.
|
|
21
|
+
1. Clicca il **nome dell'AI**, in alto a sinistra, e scegli la chat fra quelle che hai sul computer: **Claude Code** o **Codex**. Si apre in una finestra sua: tienila aperta mentre giochi.
|
|
22
|
+
2. Premi **Nuova partita**, scegli il colore, l'orologio e il livello dell'AI, e premi **Inizia**.
|
|
23
|
+
3. Muovi: l'AI risponde sulla scacchiera, e con qualche parola sotto il suo nome.
|
|
36
24
|
|
|
37
25
|
## La partita
|
|
38
26
|
|
|
27
|
+

|
|
28
|
+
|
|
39
29
|
- **Muovi** trascinando un pezzo, o cliccando il pezzo e poi la sua casa. I pallini segnano le mosse legali; quando una mossa è vietata, la pagina dice perché.
|
|
40
30
|
- **L'orologio**, se ne hai scelto uno, parte con **Inizia**. Anche l'AI ha il suo, e sa quanto tempo le resta.
|
|
41
31
|
- **Proponi patta** nel tuo turno, dopo una mossa a testa; **Abbandona** chiude la partita.
|
|
42
|
-
- **Gli aiuti**: con «L'AI ti insegna mentre giochi», nelle impostazioni, la scheda **Aiuti** mostra i pezzi in pericolo, le inchiodature e i pedoni, e l'AI, da allenatore, ti dà un'idea. L'AI disegna frecce colorate sulla scacchiera: il **?** accanto alle mosse spiega ogni segno.
|
|
43
32
|
- **Gira** volta la scacchiera; **PGN** salva le mosse nel file che leggono tutti i siti di scacchi, da aprire su Lichess o Chess.com.
|
|
44
33
|
|
|
34
|
+
## Parlare con l'AI
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
- Parli con l'AI nella **casella sotto il suo nome**, qualche parola a ogni mossa: le legge con la tua mossa. Puoi scriverle anche nella sua finestra.
|
|
39
|
+
- Anche una **mossa scritta** nella chat vale: `e4`, `Nf3`, con le lettere inglesi dei pezzi (K Q R B N), o a parole.
|
|
40
|
+
- **Il nome dell'AI** apre la scelta della chat: Claude Code o Codex, il modello (quale AI: alcune sono più veloci, altre più forti) e quanto ragiona. Più ragiona, più gioca lenta. Se cambi, la chat riparte da capo nella stessa finestra: l'AI dimentica la chiacchierata di prima, la partita resta com'è.
|
|
41
|
+
- A ogni **nuova partita** la chat aperta dalla pagina riparte da capo da sola, se l'AI ha finito di pensare: una chat lunga rende l'AI più lenta.
|
|
42
|
+
|
|
43
|
+
## Gli aiuti e i segni
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
- Con **«L'AI ti insegna mentre giochi»**, nelle impostazioni, la scheda **Aiuti** mostra i pezzi in pericolo, le inchiodature e i pedoni, e l'AI, da allenatore, ti dà un'idea.
|
|
48
|
+
- L'AI disegna **frecce colorate** sulla scacchiera: il **?** accanto alle mosse spiega ogni segno.
|
|
49
|
+
- Nel ripasso, un **bollino** su una mossa dice il giudizio dell'AI: un'ottima mossa, un'imprecisione, un errore grave.
|
|
50
|
+
|
|
45
51
|
## Il ripasso e l'analisi
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
- A partita finita premi **Analizza la partita**: l'AI la ripassa e mette sulle mosse i suoi giudizi e le sue note. Le leggi scorrendo le mosse con le frecce in fondo alla colonna, o cliccando una mossa.
|
|
48
56
|
- **Analisi**, nell'intestazione, apre le tue analisi e carica una partita giocata altrove: incolla il suo PGN, o scegli un file .pgn.
|
|
49
57
|
- Chiedi all'AI della partita nella casella sotto il suo nome.
|
|
50
58
|
- **PGN annotato** salva la partita coi commenti.
|
|
51
59
|
|
|
52
60
|
## I giocatori e il profilo
|
|
53
61
|
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+

|
|
63
|
+
|
|
64
|
+
- **Chi gioca?**: la tua immagine in alto a destra, o il tuo nome accanto alla scacchiera, apre l'elenco dei giocatori: lì ne scegli uno o ne aggiungi uno. Ognuno ha le sue partite e le sue impostazioni.
|
|
65
|
+
- **Il tuo profilo**: in **Chi gioca?**, la matita accanto al tuo nome cambia la tua immagine, il nome, come giochi, i tuoi nomi su Lichess e Chess.com e il tuo punteggio FIDE.
|
|
56
66
|
- **Il tuo punteggio**: dai tuoi nomi lì, Chesspal legge il tuo punteggio pubblico, quello delle partite rapide se le giochi, e lo dice all'AI. Niente password: quel punteggio lo vede chiunque sul sito. Senza un nome lì, l'AI sa come giochi da **Come giochi?**
|
|
57
67
|
- **Il punteggio FIDE**, se giochi tornei, lo scrivi tu: nessun sito lo dà a Chesspal. L'AI lo legge accanto a quello del sito, ognuno per sé.
|
|
58
68
|
- Se carichi una partita giocata su Lichess o Chess.com, Chesspal sa da che colore giocavi tu.
|
|
59
69
|
|
|
60
70
|
## Domande e problemi
|
|
61
71
|
|
|
62
|
-
- **L'AI
|
|
72
|
+
- **L'AI non risponde, e il suo orologio corre**: guarda la sua finestra, che può essere finita dietro le altre: cercala nella barra in basso. Se ti sta chiedendo qualcosa, rispondi lì; se l'hai chiusa, clicca il nome dell'AI e aprine un'altra.
|
|
73
|
+
- **L'AI è lenta**: ogni mossa la pensa davvero. Dal suo nome scegli un modello più veloce, o meno ragionamento.
|
|
74
|
+
- **Un pezzo non si muove**: non è il tuo turno, o la mossa è vietata; la pagina dice perché.
|
|
75
|
+
- **Hai chiuso la pagina?** Riaprila dall'icona di Chesspal, sul desktop o nel menu: la partita lasciata a metà è ancora lì.
|
|
76
|
+
- **Le tue partite** stanno in una cartella sul tuo computer: **Chi gioca?**, dalla tua immagine in alto a destra, dice dove, e **Apri la cartella** la apre. Per tenerne una copia di sicurezza, copia la cartella, con la chat e la pagina chiuse.
|
|
77
|
+
- **Una versione nuova di Chesspal**: una freccia in alto te lo dice e la installa, fra una partita e l'altra.
|
|
63
78
|
- **Quanto costa**: Chesspal è gratis; l'AI usa il tuo abbonamento, e non paghi niente in più.
|
|
64
79
|
- **L'AI può fare una mossa illegale?** No: Chesspal controlla ogni mossa. I suoi giudizi però sono suoi, e un'AI può sbagliare, come una persona.
|
|
65
|
-
- **Un backup**: copia la cartella delle tue partite, con la chat e la pagina chiuse.
|
|
66
80
|
- **Qualcosa non va?** Raccontacelo su [GitHub](https://github.com/stefanocaronia/chesspal/issues): cosa hai fatto, cosa ti aspettavi, cosa è successo. GitHub è il sito dove si fa Chesspal: ci scrivi con un account gratuito, e chiunque può leggere.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
import { drawings } from "./drawings/drawings.js";
|
|
2
3
|
/** Blocks drawn as the page's elements: headings one level under the part's, each with the anchor given by its place among them; a link to an anchor calls go. */
|
|
3
4
|
export function Blocks({ blocks, anchors, go }) {
|
|
4
5
|
return _jsx(_Fragment, { children: blocks.map((block, index) => _jsx(BlockView, { block: block, anchors: anchors, go: go }, index)) });
|
|
@@ -47,6 +48,10 @@ function BlockView({ block, anchors, go }) {
|
|
|
47
48
|
return (_jsx("blockquote", { children: _jsx(Blocks, { blocks: block.blocks, anchors: anchors, go: go }) }));
|
|
48
49
|
case "code":
|
|
49
50
|
return _jsx("pre", { children: _jsx("code", { children: block.text }) });
|
|
51
|
+
case "drawing": {
|
|
52
|
+
const Drawing = drawings[block.name];
|
|
53
|
+
return Drawing === undefined ? null : (_jsx("figure", { class: "guide-drawing", role: "img", "aria-label": block.alt, children: _jsx(Drawing, {}) }));
|
|
54
|
+
}
|
|
50
55
|
case "rule":
|
|
51
56
|
return null;
|
|
52
57
|
}
|