You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Response to the request to play
where status is one of:
* queued
* error:<error>
* started:<d-tag-of-game>:<opponent-pubkey>:<b|w>
This event is sent to both the player asking, and the player queued that was roped in as the opponent.
{
"pubkey": <player>,"kind": 20303,
"tags": [
["d": <game-id>],
["p", <server-pubkey>],
["p": <pubkey-for-white>],
["p": <pubkey-for-black>],
],
"content": <long-algebraic-move>, // or various other signals like 'quit' TBD....
}
Game error, If the game is known, and the error event came from a player of the game:
{
"pubkey": <server>,"kind": 20304"tags": [
["e": <event-that-was-in-error>],
["d": <game-id>], // if relevant (not present if game not found)
["p": <pubkey-for-white>], // if game not found, this is the author of event reacted to
["p": <pubkey-for-black>], // only if game was found, this is the other player
],
"content": <error message>...
}
To get a win today I wrote a chess server. I had to invent the protocol, and I went with this (this doesn't overlap with NIP-64):
[EDITED AS I CHANGED THE EVENTS A BIT]
Request to play:
Response to the request to play
where status is one of:
*
queued
*
error:<error>
*
started:<d-tag-of-game>:<opponent-pubkey>:<b|w>
This event is sent to both the player asking, and the player queued that was roped in as the opponent.
Game state (sent by the server initially and after every legal move). Initially it should come after the response to request to play.
FEN is https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation
Game Move
long algebraic move notation is https://en.wikipedia.org/wiki/Algebraic_notation_(chess)#Long_algebraic_notation
(but without captures or piece notation or check notation... just the source and dest and maybe a promotion piece after that, e.g. e7e8Q)
Game error, If the game is known, and the error event came from a player of the game:
If the game is not known:
I am running it right now here:
We could add this to NIP-64 (or something like it).
The text was updated successfully, but these errors were encountered: