In Corona times, it is not so easy to train children over the board. When that was possible, we used a lot of mini games with fewer pieces and most of the times a different goal. To bring those mini games online is not so easy, due to many factors:
- Known chess libraries like
chess.js
(the most used Javascript library for chess) only allows standard games and does not support mini games. - Chess online sites like lichess.org have their set of games possible, and it is not at all easy to expand that.
- Children should have a very simple web interface to start a game, play it, ...
So I am thinking about creating something myself. I am sure I can come up with a simple web application to register, pair players, ..., but the hardest part (for me) is to check that the rules of chess are met. But this set of rules is not fixed. Here are some examples
- Some mini games don't have kings at all. This is not allowed in standard chess.
- Some mini games treat the kings like normal pieces, so there is no chess, or even kings can be beaten.
- Some mini games define the end of the game when the first piece is beaten. Or a pawn is promoted.
- One variant I know has as rule that knight moves as knight, but captures as bishop, and vice versae.
- Some mini games are played on different sized boards.
- Some place pieces, that are not allowed to moved and / or captured.
What I am looking for is a library (preferred Javascript) that allows to add easily additional rules, and define for each game which rules are mandatory. Do you have recommendations about this?