Okay.
Let's have a look into this.
By the way, I already marked those here if conditions over there to make it a little bit more easier
to follow afterwards.
All right.
So we've got our method check, high score.
We've got in parameter.
We've got this capital L, which means we've got a class reference and the class reference is player.
But this time it's from smiley one.
But do not get distracted by this.
The player class looks pretty identical to what we have seen in the last video and then we are returning
in white.
Okay then we've got to local variables can be placeholder can be certain values.
We do not know this right now.
Here we get our label for our parameter P one.
So we've got an object from the class player and this object is named player.
Let's write the star.
P one is our object and its player and then we've got I get, which means we are putting an instance
field from p one into V zero.
Our instance field is player dot score from type integer.
And this is now going to be put into re zero.
And let's put it down.
All right.
Next, we've got an instance feed once again, but this time into V one.
Let's see, p one is also now an instance field and it's referenced by player dot high score from type
integer.
And this is going to be put into V one.
All right.
And this looks pretty identical as the last example, but now it's different.
So what do we have here?
We've got an if statement.
If we zero is greater, equal b one.
We jump to this condition over here.
Let's write this down.
If V zero is greater equal v one, then we jump to this condition over here.
And here we have directly afterwards again another if statement.
So in this case we are having if v zero is less equal v one, we jump to this condition.
Okay.
If v zero is less than equal v one we jump to this condition.
Let's see.
We jump down here and then we are simply returning void.
So we're getting out of this function.
All right.
That was okay, I guess.
Okay.
This is for the true statements.
For both if statements.
Let's go backwards.
Slowly.
So we go into line 18 and this one.
And now we are doing the same for the false statement.
So if v zero is less or equal v one, we jump to this condition.
This is the true part.
Now we assume it's false.
Therefore we move on directly underneath.
We've got this reference in our Java code, line 41.
And now we can see, okay, we are putting this value into an instance field.
But now it's interesting because we do not have p one at this point.
We are having P zero and we can see come a pecking smiley one player.
So this time we are using not this object, we are using the this part.
So this means p zero this dot high score.
So, so let's do this step by step.
The first part is we introduce our LS case for this one.
Okay.
And now, now we are putting the zero into p zero, p zero is this dot high score and we are putting
b zero into this.
This means this dot high score is equals v zero and v zero is player dot score.
So we are putting player dot score into this dot high score.
And this is pretty important.
And I created this case to confuse you a little bit about this, that you do not interpret your own
stuff into this, that we follow simply the strict rules of the smiley code.
Okay, so here we are having an object in our player class.
Okay?
So here we are having an object as a parameter, the player object as parameter.
But now we are referencing to this dot player, this is now the player class.
So we are in within our player class.
But if you write this down in the exact same way it you shouldn't have any struggle with this.
It might be a little bit confusing, but just remember P zero is our this operator and P one is our
object over here.
Okay, let's see.
So we also got this case right now.
That's great.
The last case we got to solve is this one over here.
This has been true.
Now let's put this to false.
Easy peasy.
We get our alt statement and this alt statement simply gotten return over here, this return void and
that's it.
This is our code.
And this one is.
Yeah, this is correct at this part.
Now let's get out our Java code because this might have confused you a little bit.
I'm not sure about this one.
For me it would be absolutely confusing.
So we've got two player objects here.
This one is in parameter and this one over here is our this.
Let's see how the code looks like.
Okay.
And once again, we can see this one over here.
The first check is if player score is less then player dot high score.
And in our case our first check is greater equal.
But it's still correct because our health statement will be the case.
If we are having the zero lower, then we want.
This is this statement over here and then we are returning out.
So we got it again, vice versa.
And here, let's see, also the same for this one over here.
Our L statement is this one over here.
And here we are having the statement which is returning out.
So this statement here is greater than player total score.
But in our case, we are checking if we are having the other case, if it's less or equal, then we
jump out.
So out of this one.
Okay, so if you reverse engineer similar code and if statements, my advice is not looking into trade,
maybe just a little bit to get some knowledge about what's used in there, but please do not rely on
this.
This will confuse you a lot if you reverse engineer this smiley Patrick adding to this, just simply
ignore what you have seen in the trade code regarding to these if statements and simply do it in the
smiley path step by step, then you shouldn't have any trouble.
Alrighty.
Next we have some little quiz and afterwards we take a look at patching those if instructions because
you can do a lot of funny things to change the statement itself or simply skip paths in the statement.
So it's pretty ridiculous what's possible there.
And the decode is still working even if you do some really crazy patching.
Okay, that's all for this video right now.
If you are not feeling comfortable regarding to if statements, please keep practicing this within Android
studio.
In case of any questions, feel free to write me a message and otherwise.
I'm looking forward to see you at the quiz.