This lesson is going to be a quick fix on an issue as we're debugging our application.
So sometimes you do have to play through the game and you can detect if there are some instances of
a bug.
And in this case, what's happening here is that if we do have two matching cards, they're still going
into playoffs, even though the last player beat both of those cards.
So this one actually should be the winner.
Player three should be the winner and he should have won all three of the cards and this should have
never gone into the playoff round.
So there is a code update that we have to do.
And the place to add that in is where we look and we see that if we have a greater than the current
high, then what we're doing is we're overriding the winner.
And we should also clear out the playoff values, as in this case we're running through and we're clearing
out all of the playoff content values anymore and we just can clear that out.
So we're clearing out the playoff array if the current card value is higher than the current high card.
So let's try that out.
And again, in order to test this out, ranks values.
So we're playing with less cards so we can better simulate this occurrence happening again.
So go ahead and make that quick update of the code.
It might take a little bit of time to reproduce the error.
So over here, we were able to simulate that issue that we saw earlier where we've got one player that
gets the high card, the next player gets the same high card.
So these two are in a playoff situation.
But then the third player comes along and beats both of them.
And this is what's happened here is where Player three ended up canceling out the playoff between the
first two players because this one ended up with a higher card.
So that was a quick fix and a quick debug on the application.
So go ahead and make that update in your code.