Ik laat hier een aantal voorbeelden zien van hoe je in het cms schaakpartijen, puzzels, en stellingen kan toevoegen in de inhoud.
Partijen
Om een Partij in te voegen, plak je gewoon PGN in je tekst. Dat wordt vanzelf naar een partijscherm omgezet. Ondersteunt ook {commentaar} tussen brackets.
PGN met enkel de zetten
{"type":"pgn","content":"1. d4 Nf6 2. Nf3 d5 3. e3 Bf5 { D04 Queen's Pawn Game: Colle System, Anti-Colle } 4. Bd3 Bg6 5. O-O Nc6 6. Nbd2 e6 7. a3 Bd6 8. Nh4 Qe7 9. Be2 Ne4 10. Nhf3 h5 11. c4 dxc4 12. Nxc4 O-O-O 13. Nxd6+ Qxd6 14. Bd2 Nxd2 15. Qxd2 f6 16. b4 Ne5 17. Rfc1 h4 18. b5 h3 19. g3 Be4 20. Qa5 Bxf3 21. Bf1 Bg2 22. Qxa7 Nf3# { Black wins by checkmate. } 0-1 ","props":[]}
Met PGN metadata
Als je een hele PGN erin zet (met de metadata zoals [Event "..."] en [White "Robert James Fischer"] etc.) Dan wordt dit vanzelf naar een viewer omgezet
{"type":"pgn","content":"1. c4 e6 2. Nf3 d5 3. d4 Nf6 4. Nc3 Be7 5. Bg5 O-O 6. e3 h6 7. Bh4 b6 8. cxd5 Nxd5 9. Bxe7 Qxe7 10. Nxd5 exd5 11. Rc1 Be6 12. Qa4 c5 13. Qa3 Rc8 14. Bb5 a6 15. dxc5 bxc5 16. O-O Ra7 17. Be2 Nd7 18. Nd4 Qf8 19. Nxe6 fxe6 20. e4 d4 21. f4 Qe7 22. e5 Rb8 23. Bc4 Kh8 24. Qh3 Nf8 25. b3 a5 26. f5 exf5 27. Rxf5 Nh7 28. Rcf1 Qd8 29. Qg3 Re7 30. h4 Rbb7 31. e6 Rbc7 32. Qe5 Qe8 33. a4 Qd8 34. R1f2 Qe8 35. R2f3 Qd8 36. Bd3 Qe8 37. Qe4 Nf6 38. Rxf6 gxf6 39. Rxf6 Kg8 40. Bc4 Kh8 41. Qf4 1-0 ","props":{"event":"Fischer - Spassky Wereldkampioenschap","date":"1972.07.23","round":"6","white":"Robert James Fischer","black":"Boris Spassky","result":"1-0","whiteelo":"2780","whitetitle":"GM","blackelo":"2548","blacktitle":"GM","termination":"Normal","annotator":"lichess.org\/@\/nsn21","variant":"Standard","eco":"D59","opening":"Queen's Gambit Declined: Tartakower Defense"}}
PGN met startpositie
Als er de FEN in de metadata staat als [FEN "..."], wordt de partij vanaf deze stelling weergegeven.
{"type":"pgn","content":"16. Na4 Nc3 17. Nxb2 Nxd1 ","props":{"fen":"r3k2r\/pp2bpp1\/2n1p1p1\/3p4\/3Pn1P1\/P1N1B2P\/1qP1BP2\/R2QK2R w KQkq - 0 16"}}
PGN met NAGs
( https://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs )
{"type":"pgn","content":"1. e4$1 e5$2 2. Nf3$3 Nc6$4 3. Bb5$5 a6$6 4. Ba4$7 Nf6$10 5. O-O$13 Be7$14 6. Re1$15 b5$16 7. Bb3$17 O-O$18 8. c3$19 d5$3 ","props":[]}
PGN met variaties
Variaties kunnen tot elke diepte genest worden tussen (ronde haakjes)
{"type":"pgn","content":"1. e4 e5 ( 1... c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6 ( 5... e5 6. Ndb5 a6 7. Na3 b5 8. Nd5 Nxe4 { Dit is een wilde vartiant } ) 6. Be3 e6 ) 2. Nf3 ( 2. f4 exf4 3. Nf3 g5 ( 3... Nf6 4. e5 Nh5 ) ( 3... Be7 4. Bc4 Bh4+ 5. Kf1 ) 4. h4 ) Nc6 3. Bb5 a6 4. Ba4 ","props":[]}
Stellingen
Een stelling (statisch) kan je maken door een FEN te plakken:
{"type":"fen","content":"rnbqkbnr\/pp1ppppp\/8\/2p5\/4P3\/5N2\/PPPP1PPP\/RNBQKB1R b KQkq - 1 2"}
Puzzels
Puzzels maak je hetzelfde als een PGN, alleen dan moet de metadata [Variant "Puzzle"] aanwezig zijn.
De viewer voor puzzels is nog aan verbetering toe, maar dat komt nog wel.
{"type":"pgn","content":"16. Na4 Nc3 17. Nxb2 Nxd1 ","props":{"variant":"Puzzle","fen":"r3k2r\/pp2bpp1\/2n1p1p1\/3p4\/3Pn1P1\/P1N1B2P\/1qP1BP2\/R2QK2R w KQkq - 0 16"}}
Test Yuri
{"type":"pgn","content":"19... Rxh7 20. Qxh7 Qxb2 21. Rc2 Qa1+ 22. Nd1 Kd7 $2 23. Qd3 a5 24. Kf1 Qb1 25. Kg2 Ba3 26. Qb3 Qxb3 27. axb3 Nd6 28. Rxc8 Nxc8 29. Nc3 Nd6 30. Nb1 Bb4 31. Kf1 e5 32. dxe5 fxe5 33. Ke2 b5 34. Rc1 a4 35. bxa4 bxa4 36. Nc3 Bxc3 37. Rxc3 Nc4 38. e4 Kd6 39. exd5 Kxd5 40. Kd3 Nd6 41. Ra3 Nb7 42. Kc3 Nc5 43. Kb4 Kd4 44. Kb5 e4 45. fxe4 Nxe4 46. Rxa4+ Ke5 (46... Kd5 $1) 47. Kc6 Nxf2 48. Ra5+ Ke4 (48... Kf6) 49. Rxg5 Kf3 50. Kd5 Nh1 51. g4 Kf4 (51... Nf2 $2 52. Rf5+ Kg3 53. Rxf2) 52. Rg8 Ng3 53. Ke6 Ne4 54. Rg6 Nc5+ 55. Kf6 $2 Nd7+ 56. Kg7 Ne5 57. g5 Kf5 $1 58. Ra6 1\/2-1\/2 ","props":{"white":"Peter Kalisvaart","black":"Joris","fen":"2r1k2r\/1p2b2B\/pq2pp2\/3p2p1\/2nP4\/2N1PPP1\/PP3P2\/1QR1K1R1 b k - 0 19","plycount":"78"}}