algorithm to play SpareFoot's connect four algorithm