Created has_three_of_a_kind method.