This is just a project that I made that has all of the rules of chess. Try it out at https://msouthwick.com/chess There are also some puzzles, that are Checkmate in 2 moves.
I also programmed a chess computer to play make the best move in any situation, and while it is not that good, I did implement the minimax algorithm looking at every possible board 4 moves into the future, generating a tree and the selecting the best possible branch. See if you can beat my computer!