A direct port of python-chess
to TypeScript: @jacksonthall22/chess.ts
#1073
jacksonthall22
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
python-chess
! Firstly, thanks to @niklasf and all the rest of the authors and contributors for your great work. I have loved working with and learning from this library for several years now, in my former work for Aimchess.com and in my own chess-related projects.Having started to explore JS/TS recently and finding its various options for chess libraries all to be lacking, I have started writing a direct port of
python-chess
to TypeScript. You can find it on GitHub and download it withnpm i @jacksonthall22/chess.ts
today!There's still a long road map towards implementing everything
python-chess
has to offer. So far, I have fully implemented the logic from__init__.py
andpgn.py
toindex.ts
andpgn.ts
respectively. Other corresponding files just have the minimal logic to make these two files work. Also, while I have tried diligently not to alter any logic, TS allows some scary behavior (to my Python brain) that has caused pernicious bugs that took me days to track down. I have manually tested the core functionality of classes likeBoard
andGame
, but an appropriate testing suite would clearly be a good next step to turn this into a stable library.If anyone is feeling inspired to help contribute, I'm wondering if I could rally enough community support to be able to transpile
engine.py
toengine.ts
. Personally, I am new enough to both TypeScript and Python threading concepts that I have no idea how to even approach this intricate task, though admittedly I have not tried digging into it yet. Maybe someday in the far future I will take on the challenge, but I would be happy to see someone else beat me to it.Thanks again, and I hope someone will find this port useful. It's a great feeling to give a little bit back to the chess community which has given so much to me.
e4,
- Jackson
Beta Was this translation helpful? Give feedback.
All reactions