Chess program language & design dilemma

Started by
1 comment, last by patishi 10 years, 7 months ago

Hi all. as i am thinking of start programming chess engine of my own, and ofcourse it would be very comfortable and friendly to program it in OOP style (JAVA), and the second posibility it to do it in C which i just started to learn, but i already have a nice grasp of the basics of the language.

Now..I know that c is "supposed" to be a little faster than java (some disagree with that) but let's leave that issue aside for the discusion, what i am really trying to figure out is leaning more toward the design of the program. should i do it in a primitive way or in object oriented fashion? (In java i can also make NOT object oriented program,but in that case i might as well use C)

I am probably going to use bitBoards for the board representation, but i can do in one single file ,and I can do it in seperate classes (one for each chess piece) and wrap each bitBoard with an object. Another example, i can make a single "generateMoves" function , and i can make seperte generateMoves functions inside each object (e.g every chesspiece will be responsible to generate its own moves) etc'.
Of course i will try not to use a lot of dynamic structures like lists and such,and use primitives the most, but still...I am afraid that using objects like this can slow the program.

(how it is best to represent pieces in chess?)

I would like to hear your opinion about this, and get some insights. Thx in advance for any info on the subject

Advertisement

no matter which language you choose, you need to visit this. hope it helps.

thanx! I know this one it is great, but i wish that sometimes they would be a little more specific on certain subjects. but it's a great information never the less

This topic is closed to new replies.

Advertisement