资 源 简 介
This single C-source application contains a library and a very basic console representation of the four in a row (aka connect 4) game.
The code shows how a computer opponent can be created using back-tracking. The level of look ahead can be adjusted, making it harder for you to win.
Two techniques of implementing back tracking are recursion and by means of a stack. This code shows the stack implementation.
One of the things that can be done using this code, is getting the library out and create a nice gui for it. Also for studying back tracking the code can be used.
You can also have fun with this library by creating two computer opponents playing against each other (with rediculous look aheads, like 18 vs 20). I plays for hours :-)
Cheers,
Jeroen van der Waal