What are $k$ consecutive candies?

Student or Learner
I would like to know if the following sentence is correct:
"While waiting for John, he suddenly realized that she won't accept the gift if there are no $k$ consecutive candies of the same type."
In particular, is it OK to use the first conditional when describing something in the past? If not, what is the correct way?
Thanks.
What are $k$ consecutive candies?
Well, it's a "story" to a math problem statement, don't focus on that. Basically it means that some objects are placed in a row (in this case candies), and we have a condition that there should be at least k (a variable) consecutive objects of the same type.
https://www.usingenglish.com/forum/t...=1#post1165294
Having read the above, I think backshift can be used: use 'wouldn't' and 'were' instead of 'won't' and 'are' respectively.
I am not a teacher.
Bookmarks