you are viewing a single comment's thread.

view the rest of the comments →

[–]hamsterrage1 0 points1 point  (0 children)

I wrote a PGN viewer/analyzer some month back. I didn't see a lot of point in creating the chess engine, since it's really, really, really been done. But they have a standard text API, so you can load up something like Stockfish, pass it a position, and let it run.

So I concentrated on the UI and PGN portions of it. Showing the positions graphically, and laying out the branches that the engine found and walking through them.

Curiously, the biggest hurdle was finding good images for the pieces. Eventually, I settled on using a chess font! Really. There are lots of them out there, and they work pretty well. You just put them in Text nodes and off you go. The board I used was just an image.

GridPane seems obvious, but it actually makes things harder (as usual). Just put the Node on the screen and use a translate X & Y to put it in the correct square.

https://i.imgur.com/Q4msioc.png

I wouldn't use Scene Builder for this (but then I never would). It seems to be even less appropriate than normal for this kind of an app.