Refined logic to disable flipping  cards at end

Disabling of flipping refined to when no more cards to flip instead of
when attempt is made to show next card’s front.