Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ugly display of many games #518

Open
mliebelt opened this issue Mar 24, 2024 · 0 comments
Open

Ugly display of many games #518

mliebelt opened this issue Mar 24, 2024 · 0 comments
Assignees
Labels

Comments

@mliebelt
Copy link
Owner

When I look at the examples in the documentation, I see the following:

image

This is rendered from the following source, when showing many games:

var pgn = ['[White "Me"][Black "You"] 1. e4 e5 2. Nf3 Nc6  3.Bc4 Bc5 4.b4 Bxb4\n\n
[White "You"][Black "Magnus"] d4 Nf6 c4 e6 Nf3 Be7 g3\n\n
[White "Magnus"][Black "Me"] e4 c5 Nf3 d6 d4 cxd4 Nxd4 Nf6 a3 '].join(" ");

So when some of the (usual) tags are missing, we get an unpleasant rendering of the list of games. Of course, if there is not too much information, it is not so easy to do a nice rendering in the list. The following heuristic could be used in the function printTags:

  1. Use the tags if all are available.
  2. Have useful replacement for missing tags:
    • Date: ??.??.????
    • White: unknown
    • Black: unknown
    • Event: leave empty
  3. If no tags are given at all, replace it by having the first few moves of the mainline.
@mliebelt mliebelt self-assigned this Mar 24, 2024
@mliebelt mliebelt added the bug label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant