pgn-viewer icon indicating copy to clipboard operation
pgn-viewer copied to clipboard

Combine board and edit mode to a board editor

Open mliebelt opened this issue 4 years ago • 2 comments

The board editor should allow the following things:

  • Allow to use circles and arrows on the board (there is no PGN to record this, so no idea, how this can be saved then. The board just keeps it, and you have to handle it manually).
  • Allow to set, reset, remove, overwrite pieces on fields
    • Drop a piece from the outside to add it.
    • Drop a piece to the outside to remove it.
    • Drop a piece to a different field, to move it. Overwrite is just a variation of this.

Why should I have such a board? In our chess class, we use now a beamer from time to time, and it would be handy to have just a board for free playing / edition / showing whatever you want.

I tried it, and when you have a board with no move, but with circles, this leads to a comment, and when exporting this to PGN, you just have that comment, and nothing else. So it would be possible to have it defined initially, by having a PGN (with only that one comment) in it.

image

mliebelt avatar Oct 26 '20 07:10 mliebelt

Usually circles and arrows are saved in comments similar to clock times and engine eval. Example PGN from https://lichess.org/study/GsRulCfc For circles %csl for arrows %cal is used. R/G/B/Y are for red, green, blue, yellow.

[Event "(BETA) Lichess Practice: 7th-Rank Rook Pawn with a Passive Rook: King on f7"] [Site "https://lichess.org/study/GsRulCfc/1OQKTlY2"] [Result "*"] [UTCDate "2018.05.20"] [UTCTime "13:58:24"] [Variant "Standard"] [ECO "?"] [Opening "?"] [Annotator "https://lichess.org/@/gbtami"] [FEN "R7/P4k2/8/8/8/r7/6K1/8 w - - 0 1"] [SetUp "1"]

{ Since the Black king is not on one of the red squares, we know this is a win for White. Let's win this game by playing the only winning move . } { [%csl Rg7,Rh7,Rb7,Rc7,Rb6,Rc6,Ra6,Ra2,Ra1][%cal Ga8h8] }

  1. Rh8 { We are now threatening to promote. However, Black can't play Rxa7 due to Rh7+, winning the rook on a7. The best Black can do is to delay the eventual loss. } { [%cal Ra3a7,Ga3a2] } 1... Ra2+ { We move towards the promotion square } { [%cal Gg2f3] } 2. Kf3 Ra3+ { [%cal Gf3e4] } 3. Ke4 Ra4+ { [%cal Ge4d5] } 4. Kd5 Ra5+ { [%cal Gd5c6] } 5. Kc6 Ra6+ { [%cal Gc6b7] } 6. Kb7 { We are now threatening a8=Q, so Black has to give up their Rook. } { [%cal Ga7a8] } 6... Rxa7+ { [%cal Gb7a7] } (6... Rd6) 7. Kxa7 *

gbtami avatar Oct 26 '20 08:10 gbtami

Thank you for the explanation, this is what I meant with

I tried it, and when you have a board with no move, but with circles, this leads to a comment, and when exporting this to PGN, you just have that comment, and nothing else.

I use that all the time, so having it on a board, even without recording moves, is something that has value (as a chess teacher for children).

mliebelt avatar Oct 26 '20 11:10 mliebelt