HI,
Finally completed my game of connect 4. The source and the exe is included in the zip. I admit that there are sections in my source that can be reduced, but i think i already spent too much time on this, so i decided to use more lines in some places and instead make it simpler. Pls leave comments and suggestions...
When the game is only two-player the source code is 302 lines, but now with its AI implemented, the code bumped up to 974 lines, thnx to all the AI functions. If anyone think it shouldn't be this long, pls drop me a few words on how to improve it, just a few words....pls.....
Actually there's one problem i still can't figure out with this program. I can't seem to validate the user data inputted. I tried to use isdigit but can't get it to work since i think i have to pass the actual character like this '6' to the function. I used isalpha in my code, but it still doesn't work out. WHenever the user input a letter ( which is suppose to be a column number ), the code fall into a infinite loop for some reason. If anyone can correct this ( i really tried but still can't do it ) please tell me how you did it, i'll really appreciate.
Anyway this is my first game in C ( my tic tac toe was done in vb ), i'm always wiling to learn.
Thank you, thank you...