| | |
Chess...confusing problem =(
![]() |
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
Well I don't have any specific question. I've been writing a chess game and can't seem to figuire out what the problem is with it! I tried debugging it for a few hours now and am about to give up altogether and rewrite it. The problem occurs seemingly randomly when the king is moved (on either team). It throws an access violation for some reason...and I can't seem to figuire out the exact circumstances that trigger it. I'm thinking the problem lies in the recent (and still pretty sloppy) additions of check, checkmate, and castling. Any help would be appreciated!! I would post the code but the project is pretty big at this point, so it's probably easiest just to download it (Project is attached). Thanks!
Your zip file appears to be corrupt. At least according to my copy of WinZip.
"We Americans got so tired of being thought of as dumb by the rest of the world that we went to the polls last November and removed all doubt."
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
Sorry I zipped it as rar then changed the extension to zip after I found out rar cant be uploaded. WinRar opens it fine! I don't have winzip =(. When I get home I'll get winzip and re-upload for you. I appreciate that some people are actually making an attempt to help debug it!
Last edited by skatamatic; Jan 8th, 2009 at 1:21 pm.
And it seems you have archives within archives within archives?
And, shouldn't there be some implementation files for the various classes?
And, shouldn't there be some implementation files for the various classes?
"We Americans got so tired of being thought of as dumb by the rest of the world that we went to the polls last November and removed all doubt."
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
Well before you do anything, might wana fix a lil problem w/ ur game.
Your pon can move 2 spaces even when its not its first move : /
I recomend saying if the pon is not in the start y axis, then it can only move 1 space, else it can move 2. Because pons cant move backwards, this will assure it works. But i havent looked at code first so i cant solve your problem yet. I will check.
also i moved the king allot and dident get any access violation. But i will see
Your pon can move 2 spaces even when its not its first move : /
I recomend saying if the pon is not in the start y axis, then it can only move 1 space, else it can move 2. Because pons cant move backwards, this will assure it works. But i havent looked at code first so i cant solve your problem yet. I will check.
also i moved the king allot and dident get any access violation. But i will see
Last edited by u8sand; Jan 8th, 2009 at 6:51 pm.
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
•
•
•
•
Well before you do anything, might wana fix a lil problem w/ ur game.
Your pon can move 2 spaces even when its not its first move : /
I recomend saying if the pon is not in the start y axis, then it can only move 1 space, else it can move 2. Because pons cant move backwards, this will assure it works. But i havent looked at code first so i cant solve your problem yet. I will check.
also i moved the king allot and dident get any access violation. But i will see
i will redo the whole thing right now since the one i uploaded seems to be totally fried.
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
Lol. Sorry about that everyone. Here's the new project that, other than the forementioned issue, is working fine. And regarding the implementation files, everything is inlined right now, so its all jammed in the headers. I will probably end up changing this when I start the AI to increase performance.
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
•
•
•
•
Generally it's a good idea to abstract the problem into as simple and small piece of source code that you can rather than upload your entire project. This way when an answer is obtained, it will help others in the future as well, rather than just help the king move properly!
Dave
-Update - I think I may have the king working now, but now the checkmate seems to be failing! I'll post up when I get home tonight.
![]() |
Other Threads in the C++ Forum
- Previous Thread: get/put(VARIANT newVal) ??
- Next Thread: FTP server
| Thread Tools | Search this Thread |
action api array auto based beginner binary bitmap c++ c/c++ calculator challenge char class classes code coding compile console conversion count createcopyofanyfileinc delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game garbage givemetehcodez graph gui hmenu homeworkhelp homeworkhelper iamthwee ifstream input insert int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node noob output parameter pointer primenumbersinrange problem program programming project python random read recursion reference rpg sockets string strings temperature template test text text-file tree url variable vector video win32 windows winsock wordfrequency wxwidgets






