944,005 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3606
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 30th, 2009
0

Chess program

Expand Post »
I'm not good in C++ and I need your help. I have some small program that can automatically play chess in internet chess servers. It needs only the chess engine to play. I play only on www.kurnik.org, but from a few months they changed adress to www.playok.com. My problem depends on this, that when they changed the adress, they too changed the chess board. Program can't recognize the board and I can't use it to play. I don't know how to repair it. I want play with this program on this chess server.

In the attachment are the program and C++ 6.0 sources. If someone can repair this program, I will be grateful.

Screens:

New board:
http://chalon-echecs.fr/wp-content/u...12/playok4.jpg

Previous board (sorry for the size, but I can't find larger):
http://www.szachy.tbg.net.pl/grafika...ry/kurnik2.jpg

Program:
http://www.sendspace.com/file/j441fg
Last edited by Klapiii; Mar 30th, 2009 at 2:41 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Klapiii is offline Offline
12 posts
since Mar 2009
Mar 30th, 2009
0

Re: Chess program

The source does not include the *.dsw file for use by VC++ 6.0 IDE. And next time you zip up source code you should delete all the files that are generated by the compiler, such as all the *.obj files. That will make the zip file smaller.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Mar 30th, 2009
0

Re: Chess program

So it can't be repaired by using sources? I hope that it is possible from .exe file Btw. thanks for the reply
Last edited by Klapiii; Mar 30th, 2009 at 4:39 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Klapiii is offline Offline
12 posts
since Mar 2009
Mar 30th, 2009
0

Re: Chess program

I might be possible, but I don't know what source files to include in the project. If you can get the *.dsw file or a makefile (usually has *.mak file extension) that would be great. The *.exe file is useless for this purpose.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Mar 30th, 2009
0

Re: Chess program

I don't have this files There is website of author this program (I can't contact with him, because he didn't make accessible any e-mail or something):
http://www.mgn.ru/~internetchesskiller/

Maybe it will be helpful for you, but I doubt. I believe in you
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Klapiii is offline Offline
12 posts
since Mar 2009
Mar 30th, 2009
0

Re: Chess program

Actually, since it appears that the program scans the chessboard visually you should be able to adapt it to the 'new' chessboard layout. It's really just a matter of changing it so that it recognizes the new board and pieces. It looks like the original compiler was CBuilder; you will need to create a project or makefile for your compiler. It actually appears that the makefile/project is for CBuilder 6.0, *not* Visual C++ 6.0, which is why there is not a ".dsw" file (and the obj and other intermediate files are a result of the way the auther zipped up the file for download).
You will not be able to modify the exe, as that is compiled code; however with these sources you can modify the files and build your own exe. I haven't yet looked through all of it; it is possible that the information for recognizing the board and the pieces is provided by an external file, but since the exe does not require separate files for it to load, this data is probably stored as either a resource (if you are lucky), or as hard-coded data in the source (if you are not lucky). Hope for the first, but you will probably end up with the second case imho.

So, to sum up: you need to create a project or makefile (which itself is a type of project) for your own compiler. The project needs to specify what cpp files to compile and link. It won't really hurt anything to list *all* of the .cpp files in the project, as this will result in a slightly larger exe (which is probably not a big factor for you). The compiler and linker should optimize this code out anyway. Once you have a valid exe building, you then need to find where the data for the board and pieces is specified and modify this accordingly to reflect the new board and piece images. Without getting deeper into it I don't know how complex a task that is.

Thanx...
Sean
Reputation Points: 13
Solved Threads: 6
Light Poster
seanhunt is offline Offline
40 posts
since Oct 2008
Mar 30th, 2009
0

Re: Chess program

Thanks for the reply. I must only find where is the information for recognizing the board and pieces. I searched in the source and I didn't find some significant information or images of pieces or board. I don't know how it recognizes the board after captured screen. It is riddle. Maybe you will decode it.

Greets,
Michael
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Klapiii is offline Offline
12 posts
since Mar 2009
Mar 30th, 2009
0

Re: Chess program

my guess is that the code you want is in the folder fruit -- it has a board.cpp and board.h which might contain relevant information.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Mar 30th, 2009
0

Re: Chess program

Thanks a lot. But what lines I must change? I don't know what parameters, etc. must be changed in these files.
Last edited by Klapiii; Mar 30th, 2009 at 7:26 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Klapiii is offline Offline
12 posts
since Mar 2009
Mar 30th, 2009
0

Re: Chess program

This project can only be compiled with Borland compilers because of all the Borland-specific code it contains, and I don't have that compiler. Sorry, but I can't help you with this.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: C++ Program Help For An Assignment
Next Thread in C++ Forum Timeline: API interchangable?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC