Chess program

Please support our C++ advertiser: Intel Parallel Studio Home
Closed Thread

Join Date: Mar 2009
Posts: 12
Reputation: Klapiii is an unknown quantity at this point 
Solved Threads: 0
Klapiii Klapiii is offline Offline
Newbie Poster

Chess program

 
0
  #1
Mar 30th, 2009
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.
Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1463
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Chess program

 
0
  #2
Mar 30th, 2009
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Quick reply to this message  
Join Date: Mar 2009
Posts: 12
Reputation: Klapiii is an unknown quantity at this point 
Solved Threads: 0
Klapiii Klapiii is offline Offline
Newbie Poster

Re: Chess program

 
0
  #3
Mar 30th, 2009
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.
Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1463
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Chess program

 
0
  #4
Mar 30th, 2009
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Quick reply to this message  
Join Date: Mar 2009
Posts: 12
Reputation: Klapiii is an unknown quantity at this point 
Solved Threads: 0
Klapiii Klapiii is offline Offline
Newbie Poster

Re: Chess program

 
0
  #5
Mar 30th, 2009
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
Quick reply to this message  
Join Date: Oct 2008
Posts: 40
Reputation: seanhunt is an unknown quantity at this point 
Solved Threads: 6
seanhunt seanhunt is offline Offline
Light Poster

Re: Chess program

 
0
  #6
Mar 30th, 2009
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
Quick reply to this message  
Join Date: Mar 2009
Posts: 12
Reputation: Klapiii is an unknown quantity at this point 
Solved Threads: 0
Klapiii Klapiii is offline Offline
Newbie Poster

Re: Chess program

 
0
  #7
Mar 30th, 2009
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
Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1463
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Chess program

 
0
  #8
Mar 30th, 2009
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Quick reply to this message  
Join Date: Mar 2009
Posts: 12
Reputation: Klapiii is an unknown quantity at this point 
Solved Threads: 0
Klapiii Klapiii is offline Offline
Newbie Poster

Re: Chess program

 
0
  #9
Mar 30th, 2009
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.
Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1463
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Chess program

 
0
  #10
Mar 30th, 2009
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC