Check this out- 2 Player Checkers Game

It has been 3 months that i started learning c++ .

This is the game i developed for my semestorial project.

It has two bugs at the moment which will be worked on later (time shortage now)
1. Checker notifies jump when in 0-1 row and 6-7 row.
2. If King and Checker can jump at a time, Checker has got preference.

Please leave ur comments ... thank you :)

Here is the link to the cpp and exe file

https://skydrive.live.com/?cid=ecf3fc9286c8029f&sc=documents&uc=2&nl=1&id=ECF3FC9286C8029F%21777
1300 lines of code for this is ludicrous.
You have gotos all over the place. They are hard to read and hard to debug.
You have
1
2
3
4
5
6
7
8
(i==0 && (j==0 || j==2 || j==4 || j==6)) ||
(i==1 && (j==1 || j==3 || j==5 || j==7)) || 
(i==2 && (j==0 || j==2 || j==4 || j==6)) ||
(i==3 && (j==1 || j==3 || j==5 || j==7)) ||
(i==4 && (j==0 || j==2 || j==4 || j==6)) ||
(i==5 && (j==1 || j==3 || j==5 || j==7)) || 
(i==6 && (j==0 || j==2 || j==4 || j==6)) || 
(i==7 && (j==1 || j==3 || j==5 || j==7))
and similar monsters. This code here is equivalent to (i-j)%2 == 0. I haven't read all of your code, so I can't give criticism on it's structure though.

If you are going to use platform specific functions, you could make better use of them. Now you only use Sleep, which serves little purpose. If you looked into console functions windows API gives you, you could make it colourful, comfortably distribute text on the screen and etc.
Though a much better idea would to drop console and use some graphics library like SFML.

User interface is not comfortable. You could have him enter "a1 to b2" or something like that, instead of asking each coordinate separately. Don't force your notation on the user. You can easily convert "a1" to 0,0 yourself.

Sorry if I'm a bit harsh. I understand you just started. I'm sure most of there problems will disappear as you gather more experience.
Last edited on
i appreciate your corrections a lot..they are valuable to me :) thanks a lot... i am looking forward to more corrections....so that i can get back with simpler code and better program :)
Topic archived. No new replies allowed.