Relative Content

Tag Archive for chess

About classes and their valid states

I get stuck each time I need to write a constructor for any class I design. The reason is that I am not sure what should go into a constructor and what should not.

Which programming guidelines for a chess network application?

I’d like to implement a simple chess peer to peer network application : one instance of the program may register friends player, and when one friend is “connected” (I mean both available by another program instance and registered as friend), I can ask him to play a game.

Having issues with chess.js, valid moves are not being displayed via socket.io after reloading an in-progress game

I’m writing a multiplayer chess app using chess.js, react-chessboard, socket.io, and React that should allow users to play chess with each other and store the history of the games. I’ve gotten it to work up to a point, I’m able to start a game, play a few moves between 2 users, and send the position to the database but as soon as I leave to the menu and re-enter the game, it only allows 1 move to be made and it doesn’t send that move to the other player. The socket seems to be firing because an error saying the move was invalid shows up on the other users console, which is strange because the move was allowed on the first users screen and they have the same chessboard positions on screen.