Sign in to follow this  

can anyone pls help me..^^

This topic is 3490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can anyone pls help me in programming a simple chess program in turbo c++.i was asked to create a simple chess program in our subject. a chess program that doesn't have much graphics and moves will be only entered(e.g. p1 to G4) and when eating(e.g. p1 to g4xKnt2)...the graphics can just be a simple lines...pls..help me do this..^^

Share this post


Link to post
Share on other sites
You probably won't find many people here willing to do your homework for you. If you get some programming done, and then give us some code and explain any problems you have, I am sure many people will try to help.

I would use an enumeration for the pieces;

enum eGamePiece
{
Piece_NoPiece = 0,
Piece_Pawn, Piece_Rook, etcetera
};

and a structure for the tiles, containing what piece is currently there and a flag for which player that piece belongs to

struct BOARD_TILE
{
eGamePiece currentPiece;
bool black;
} gameBoard[8][8];

You would then need functions to get player input, to check the legitimacy of the player's move and to update the board after the move was made, and a function to draw the board - I did something similar for scrabble using simply std::cout and switches to output an ASCII board. _ and | are your friends.
use # for white squares.
To use any more advanced graphics would require a significant extra amount of work.

Share this post


Link to post
Share on other sites
We don't do homework help here. If you have specific problems, people might be able to help, but just asking for fixes without demonstrating that you've done work ahead of time is not going to work.

Share this post


Link to post
Share on other sites

This topic is 3490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this