detect vertical and diagonal win