However, you also need the same code running on the frontend in order to do validations before sending moves to the backend. That optimization helps distribute some server load and gets you immediate feedback. In Java's case, I'd use some java to js or java to kotlin to js transpilation.
I Made a Chess Library in Java
11–20 of 31 posts
Re: I Made a Chess Library in Java
#12You need to switch your data representation to 0x88 [1] or bitbords [2] to get anything performant. You won't get anywhere with a class hierarchy [1] https://www.chessprogramming.org/0x88 [2] https://www.chessprogramming.org/Bitboards
That said, chess programming is a _wonderful_ education in Computer Science, and you'll be following in the footsteps of so many great figures in the industry. Understanding bitboards and how to work with them can take you all the way from the bit-twiddling chapters of The Art of Computer Programming, right up to recent advances in CPU architecture and instruction sets. Learning how search works will teach you both very low techniques and high level heuristics in performance optimisation. And of course you can go all all the way up to recent advances in evaluation from deep learning.
Re: I Made a Chess Library in Java
#13Re: I Made a Chess Library in Java
#14You need to switch your data representation to 0x88 [1] or bitbords [2] to get anything performant. You won't get anywhere with a class hierarchy [1] https://www.chessprogramming.org/0x88 [2] https://www.chessprogramming.org/Bitboards
Re: I Made a Chess Library in Java
#15Re: I Made a Chess Library in Java
#1610 Years later, the code (which I had put on GitHub) made its way into a Minecraft mod called MineChess: http://petrustheron.com/posts/chessmate.html
Source code: https://github.com/theronic/chessmate
Re: I Made a Chess Library in Java
#17There is also http://www.chesspresso.org/ which worked great for PGN and FEN processing.
Has had some very minor fixes since the last source forge version.
Re: I Made a Chess Library in Java
#18As someone who has implemented online multiplayer tbs games before, this is exactly the kind of thing you would use at the backend. However, you also need the same code running on the frontend in order to do validations before sending moves to the backend. That optimization helps distribute some server load and gets you immediate feedback. In Java's case, I'd use some java to js or java to kotlin to js transpilation.
Re: I Made a Chess Library in Java
#19Awesome, I would encourage turn this into a actual chess game using JavaFX.
That's a great idea, I'm going to look into creating an online chess game application soon!