detect vertical and diagonal wins