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
Edited by patishi, 31 August 2013 - 07:46 AM.