- board grid to animate the pieces, determine moves, etc
- whether black king’s rook has moved (for castling)
- whether black queen’s rook had moved
- whether white king’s rook had moved
- whether white queen’s rook had moved
- whether black king has moved
- whether white king has moved
- whether or not last move was a pawn jump, and which pawn if so
Let’s just leave it to two views: black’s and white’s
This is difficult because peer.js doesn’t work with node.js. But if I have time I’ll still look into it.
In progress!
- Design plan for error handling. If peers get disconnected, how is board state recovered?
- Does the site enforce rules? Can you put your own kind in check, e.g.?
- Does the chess board act more like a real chess board, or more like a computerized board? Can you pick pieces up off of the board and move them to the side, e.g.?
- Dark/light mode
- Parse castling
- Parse promotion
- Parse check/checkmate (
/#/+) - Parse “e.p.”
where simple mode you can treat the set like a physical set, and digital mode where the set behaves like, e.g. chess.com. Does this make sense?
My first thought is that I want the various components to be composable: chess clock, side pieces, chess board. You might want a clock in both physical and digital modes, but you’d only want side pieces in physical mode. Plus, the behavior of the clocks would be different.
- Accessing the correct `this`: https://stackoverflow.com/questions/20279484/how-to-access-the-correct-this-inside-a-callback
- You can’t use peerjs in nodejs
- You can’t interact with local HTML/JS/CSS files the same way that you can when you’re requesting the files from a server