Show Bid Request
chess programming using C++
Bid Request Id: 36262
|
|
|
Description:
Write a C++ program “exercise1.cc” that allows two players to play a game of chess. Use the guide below. Your program does not have to be able to suggest moves, reject illegal moves, or cope with the promotion of pieces, castling, etc.. Try not to use C techniques that have C++ equivalents. Input and output need only be through text (cin, cout and cerr).
Guide 1. Create two enumerated types: PieceType and PlayerColour. The piece types are pawn, castle, knight, bishop, queen and king. The player colours are black and white. 2. Create a Piece structure, which stores the type & colour of a piece. 3. Create a global array of pointers to Pieces, in which to store the board: Piece* board [8][8]; // an entry of 0 means ‘no piece&' 4. Write a function to put a player&'s pieces on the board at their initial positions. This function should take one argument: player colour. Remember to create each new Piece before setting its type&colour. 5. Write a function to display the board in its current state. Use upper case characters for black pieces and lower case characters for white pieces (or vice-versa), eg. “P” for a black pawn. 6. Write a function to input a move in the form “FromRow FromColumn ToRow ToColumn”, eg. “1 b 3 c”. This function should only accept the four inputs if they are of the correct types, and should convert the two character inputs to numerical values. For this exercise only, use the following global variables: int fromRow,fromColumn,toRow,toColumn; 7. Write a function to carry out a move that has been input. This should output a congratulatory message if a king is taken. 8. Finish your program by writing the main function (short!) to blank the board, put the players pieces on it, and then repeatedly display the board, input a move and carry out that move. 9. Test your program.
Deliverables: 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
unix
Must be 100% finished and received by buyer on:
Nov 2, 2021 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$15 (USD)
|
Nov 20, 2002 11:12:34 AM EDT
|
9.74
(Excellent)
|
|
|
Hello,
I can write a C++ program to play a simplified game of chess within a day.
Play will alternate white then black, but no logic will enforce legitimate chess moves.
I will be developing your program with GNU C++ on Linux.
A IDLER Chief Software Architect Idleswell Software Creations
P.S. I presume your deadline is actually Dec. 2 (not Nov).
|
|
|
|
|
|