Page 1 of 1

amateur programmer looking to make a chess tool

PostPosted: 04 Oct 2022, 14:00
by brandons111
hello,

i am new here so please forgive me if this is the wrong place for this post.
i have been an amateur programmer most of my life and i'm currently using javascript (don't laugh too hard haha) to assist me in making some simple projects for personal use

i am looking to create an app that turns any given position or ECO (Encyclopedia of Chess Openings) code into an unsigned 64 bit integer (using bitboards i assume)

there might already be an app, website, or source code for this task... but i have been unable to find it so far
if anyone is able to assist me in finding or creating this tool i would appreciate it

i have found a json file on github containing most ECO code it seems, which should be helpful
https://github.com/hayatbiralem/eco.json

i have also found a 'Bitboard Viewer' that allows me to do logical operations based on 2 positions
https://github.com/Tearth/Bitboard-Viewer

i will continue thinking how to accomplish this task alone, i have done some coding related to chess before but it was long ago

ty for your time, and good luck/have fun on your personal projects,
brandon

Re: amateur programmer looking to make a chess tool

PostPosted: 11 Oct 2022, 08:52
by H.G.Muller
It is not clear to me what you want this 64-bit integer to represent. And I thought JavaScript did not support 64-bit integers?

Since an ECO code seems to consist of an upper-case letter followed by two digits, it is easy enough to convert it to a number (and you won't need 64 bits for it): (ECO.charCodeAt(0) - 65)*100 + parseInt(ECO.substring(1)). But this is probably not what you mean...