I have already posted few messages in this forum, should mention that members here are quiet helpful in nature(though my problem was not solved, at least it was discussed at a length).
I have written a connect four program but it plays random unless it gets to see 4 in row for the depth it is searching. To make it better I wanted to apply alpha-beta pruning but I was not successful in doing so.Hence I tried to write a method which will determine connect in 3 for itself as well as for the opponent.
As I wrote this code and compiled it, It only looks for connect in 3 rather than blocking or going for win. It doesnot give priority to connect 4 as to connect 3 even though I have given higher value for connect four.