algo to detect solutions on a connectfour board