Terry Bolo wrote:Hi all, my apologies for my dumb question but i'm new to programming in general. I want to create a simple chess engine but i do not have the skill to do so as i'm learning c++ currently. All i want to do for now is find a way to represent the board. I have read Dr. Hyatt's page and decided to use 0X88 board representation but i'm still a little confuse.
...
Here's my problem and not sure what to do next. Can someone please give me some hints. Thanks
Learning C++ _and_ chess programming is not a good idea.
Either you will do it very C++ like and end up with a strange
chess program or you will write a reasonable chess program
that looks like C and not C++. Chess in C++ can be done but
it is hard for a beginner.
Reading Bob's page alone is not enough. Find and read more
texts about chess programming, e.g.
http://www.brucemo.com/compchess/programming/
Here was a thread for chess programming beginners in a forum
at TalkChess.com:
http://216.25.93.108/forum/viewtopic.ph ... 586&t=3294
http://216.25.93.108/forum/viewtopic.ph ... 610&t=3294
http://216.25.93.108/forum/viewtopic.ph ... 166&t=3294
Perhaps these links work, I don't know.
In your code:
const int torret = 500; // torret is better known as rook.
int board[128]; // char board[128] ?
You have to decide but first you have to understand.
const int king = 5000; // Kings cannot be captured. Why a value?
And why piece values in centipawns for the board representation?
For pieces on board better use something like
1 = white pawn, 2 = white knight, ..., -1 or 7 = black pawn, ...
And regarding C++, where is a position class?
See, you just jumped in very cold water to learn swimming.
Have a warm welcome here.
Harald