mainsworthy wrote:Thanks all for your comments! I didnt have a clue before hand how to program chess but Im not a biginer Ive programing been since 1980, and I have studied at poly and have a C&G in cobol programming, I have plenty of programs around the net for Mac Linux and windows like wargames etc..
Okay, I'm sorry about mistaking you for a beginner, obviously you've been programming much much longer than I have. Your Cobol background explains Mainsworthy's style of C++ pretty well.
BUT I KNOW the code is badly set out, the code went well untill I didnt know how to program a chess engine, it was all trial and error after that(shoving variable and arrays around around etc...),...
It was the same thing for me when I wrote Sloppy - I learned C and chess programming on the way and the codebase had many complete rewrites due to bad design and unorthodox practices. I'm still not satisfied with the code, and I wish I had enough time to start over once again.
if you look at the include files there a bit clearer than the main program.
I didn't find any include files (*.h). Maybe I'm missing something?
My programing style is my own and I dont expect you to understand it easy, I do things in my prgrams this way because Im not getting paid, and I can reuse code in my own programs better than object programming. Im not defending my style I do know its mess, but , the proof is in the eating, it plays chess !+ and it has given me an understanding I would not of had about programing a chess engine.
I was honestly trying to help. I wish someone had told me about coding conventions and style guides before I started writing a chess engine. It's not just about conforming to the masses and obeying the programming gods, but most of the rules are demonstrably beneficial to the programmer and hard to argue against.
Hey and if you look at the code you will see me trying to hand code a negamax, untill i found the proper algo
I saw that, and found it confusing. Why do you keep stuff like that in your public sources? If you want to preserve the editing history you should use a version control system.
I dont class c++ as my favourite language, I hate it, but some thing have to be done in c++ , Im not comfatable with local variables thats why I pass arrays.
If you're not comfortable with local arrays then it wouldn't actually be far from the truth to call you a beginning C/C++ programmer. Seriously, this is basic, fundamental stuff.