glinscott / Garbochess-JS

A strong javascript chess engine using WebWorkers
http://forwardcoding.com/projects/ajaxchess/chess.html
Other
310 stars 100 forks source link

OOP version?? #18

Open diegosolo opened 10 years ago

diegosolo commented 10 years ago

Hi!, could a OOP version of GarboChess be made? I've tried it very hard but I get a stack overflow error. I'm very much sure I made a mistake converting variables into properties, but I just can't find where the problem is. It hangs on the "MovePicker" object.

Can I send you the code? Thanks!

xtagon commented 10 years ago

:+1: I would love this, too. It would make it easier to integrate Garbochess with other JS libraries without polluting the global scope.

@diegosolo Go ahead a post the code :)

glinscott commented 10 years ago

That's awesome that you've done that! I don't have time to debug it though :(. Sorry it's such a mess, it evolved over time, and initially javascript performance was better as global functions (in IE 8!). Nowadays, it would probably be even faster with nice board/etc. classes.

Feel free to post the code though!

diegosolo commented 10 years ago

I'm Sorry for two things... first of all, I only converted to OOP the garbochess.js file and made some tests whithout the board UI. And also, I don't know how to post the code... sorry I'm very new. Any help? Thanks!

xtagon commented 10 years ago

@diegosolo The best way to share your changes is with Git (we're on GitHub after all). If you know how to use Git, then all you need to do is fork this project on GitHub, make your changes, and then push back to GitHub.

If you aren't familiar with Git or GitHub it might be a bit overwhelming. If you don't want to do it that way, you could always share your code by uploading to Dropbox or Google Drive or any other file sharing service, but in the long run this will make it more cumbersome to collaborate.

diegosolo commented 10 years ago

Hi! I've forked and uploaded the OOP version here https://github.com/diegosolo/Garbochess-JS. I hope someone with more knowledge could debug it. Thanks!