upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/64.md
diff options
context:
space:
mode:
Diffstat (limited to '64.md')
-rw-r--r--64.md19
1 files changed, 0 insertions, 19 deletions
diff --git a/64.md b/64.md
index b65fb56..8ea0ac6 100644
--- a/64.md
+++ b/64.md
@@ -14,19 +14,6 @@ This NIP defines `kind:30` notes representing Chess games in [PGN][pgn_specifica
14 14
15The `.content` of these notes is a string representing a [PGN-database][pgn_formal_syntax]. 15The `.content` of these notes is a string representing a [PGN-database][pgn_formal_syntax].
16 16
17### Tags
18
19A note can contain `e` tags of each move or a subset of moves with the hashed piece placement data of a [FEN][fen_wikipedia] string, e.g.
20```shell
21sha256('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR') := '63e2bcdcf5b275cd48b535ed210fb321197c4296b08d04329ca2d8f4391342a4'
22sha256('8/8/4R1p1/2k3p1/1p4P1/1P1b1P2/3K1n2/8') := 'e8f876dfe8adac7ee02413f2160bae5808b7ea27a190cc7d4896d5e64f600c3d'
23```
24
25```json
26[ "e", "63e2bcdcf5b275cd48b535ed210fb321197c4296b08d04329ca2d8f4391342a4"]
27[ "e", "e8f876dfe8adac7ee02413f2160bae5808b7ea27a190cc7d4896d5e64f600c3d"]
28```
29
30## Example 17## Example
31 18
32### Content 19### Content
@@ -82,9 +69,7 @@ Nf2 42. g4 Bd3 43. Re6 1/2-1/2
82 "kind": 30, 69 "kind": 30,
83 "tags": [ 70 "tags": [
84 ["alt", "Fischer vs. Spassky in Belgrade on 1992-11-04 (F/S Return Match, Round 29)"], 71 ["alt", "Fischer vs. Spassky in Belgrade on 1992-11-04 (F/S Return Match, Round 29)"],
85 [ "e", "63e2bcdcf5b275cd48b535ed210fb321197c4296b08d04329ca2d8f4391342a4"],
86 ... 72 ...
87 [ "e", "e8f876dfe8adac7ee02413f2160bae5808b7ea27a190cc7d4896d5e64f600c3d"]
88 ], 73 ],
89 "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2" 74 "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2"
90 ... 75 ...
@@ -99,8 +84,6 @@ Clients SHOULD display the content represented as chessboard.
99 84
100Clients SHOULD publish PGN notes in ["export format"][pgn_export_format] ("strict mode", i.e. created by machines) but expect incoming notes to be in ["import format"][pgn_import_format] ("lax mode", i.e. created by humans). 85Clients SHOULD publish PGN notes in ["export format"][pgn_export_format] ("strict mode", i.e. created by machines) but expect incoming notes to be in ["import format"][pgn_import_format] ("lax mode", i.e. created by humans).
101 86
102Clients SHOULD add `e` tags of each move or a subset of moves (hashed piece placement data of a [FEN][fen_wikipedia] string) in order to improve discoverability of certain board positions.
103
104Clients MAY include additional tags (e.g. like [`"alt"`](https://github.com/nostr-protocol/nips/blob/master/31.md)) in order to represent the note to users of non-supporting clients. 87Clients MAY include additional tags (e.g. like [`"alt"`](https://github.com/nostr-protocol/nips/blob/master/31.md)) in order to represent the note to users of non-supporting clients.
105 88
106## Relay Behavior 89## Relay Behavior
@@ -114,7 +97,6 @@ Relays MAY validate PGN contents and reject invalid notes.
114- [PGN Seven Tag Roster][pgn_seven_tag_roster] 97- [PGN Seven Tag Roster][pgn_seven_tag_roster]
115- [PGN Import Format][pgn_import_format] 98- [PGN Import Format][pgn_import_format]
116- [PGN Export Format][pgn_export_format] 99- [PGN Export Format][pgn_export_format]
117- [Forsyth–Edwards Notation (FEN)][fen_wikipedia]
118- [lichess / pgn-viewer (GitHub)](https://github.com/lichess-org/pgn-viewer): PGN viewer widget, designed to be embedded in content pages 100- [lichess / pgn-viewer (GitHub)](https://github.com/lichess-org/pgn-viewer): PGN viewer widget, designed to be embedded in content pages
119 101
120[pgn_specification]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md 102[pgn_specification]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md
@@ -122,4 +104,3 @@ Relays MAY validate PGN contents and reject invalid notes.
122[pgn_seven_tag_roster]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md#811-seven-tag-roster 104[pgn_seven_tag_roster]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md#811-seven-tag-roster
123[pgn_import_format]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md#31-import-format-allows-for-manually-prepared-data 105[pgn_import_format]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md#31-import-format-allows-for-manually-prepared-data
124[pgn_export_format]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md#32-export-format-used-for-program-generated-output 106[pgn_export_format]: https://github.com/mliebelt/pgn-spec-commented/blob/main/pgn-specification.md#32-export-format-used-for-program-generated-output
125[fen_wikipedia]: https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation