webxdc / ChessBoard

A webxdc chess game for two players and many observers :)
GNU General Public License v3.0
7 stars 1 forks source link

Treat the board as a document #8

Open link2xt opened 11 months ago

link2xt commented 11 months ago

Currently this XDC implements not just the board, but the game. When you start it the first time, you do not see the board, but only the button "Start Game", clicking which gives you a "Waiting for opponent..." message.

I propose to simplify the app by making it an app for collaborative editing of the game state or game transcript. Instead of trying to assign players to the game, open the board immediately and let everyone in the chat move both black and white figures and write a transcript with lines e.g. "Alice: e2e4". It is fine if the same user plays both sides (e.g if you just want a board in Saved Messages chat) or someone in the chat continues abandoned game. As long as nicknames are added to the transcript it should be easy to see if someone joins the game.

To make it easy to recover the game if someone accidentally does a move, there should be an "undo" option.

Selecting who is doing the first turn can be outside the app, e.g. by just doing the first turn in the draft mode and then taking turns or let the one who lost the game do the first turn in the next game.

I think this approach is closer to the original idea of WebXDC where "update" is an update to the document state and current state is determined by applying the log of updates to the initial state with a reduce/fold operation.

link2xt commented 11 months ago

Maybe it is easier to apply this to https://github.com/webxdc/Othello first or even make an alternative version (and name it "Othello board"). There rotating the board is much less important.