So now let me actually show you what's going on here.
Exactly.
So here are our application is actually running.
And here are our image here.
So now as you can see here are when I click on this image it's going to actually execute these lines
of code here inside of the set and click listen on it.
So now let's actually click on this image here and see what happens.
You wrote four plus one is equal to five.
So as you can see here first we actually created a value but an integer valuable some and we assigned
the return value of the Smurfette with this valuable.
OK.
As you can see here first it's going to actually execute this method here.
So let's actually go inside this let's roll the dice here.
So just hold the command key and then click on the Smurfette.
All you can actually if you are using a Windows machine you can actually call the control key and then
click on this.
Let's roll the dice Meffert.
And now we are inside this.
Let's roll the dice first.
It's going to actually create an integer variable in a rant die one.
And then this can actually generate an integer random number between number 1 and number 6.
And then this can actually a sign that the truth is valuable into.
One.
OK.
And then you actually created another integer variable.
And again we assigned this random number that is actually between a random number between number 1 and
number 6 and we are actually assigning that value to this random variable.
OK.
And here we created as an integer value but again caught some.
And here I am assigning the sum of these two values to this variable.
OK.
So this takes you here.
This takes viewers here that you can see are actually the result of executions of these of these lines
of code here.
OK.
So here it says the calculations that said text string that formats all the calculations value plus
you rolled as you can see this is the value you rolled personally plus percent the equal person the
rand Tyvon.
As you can see randomly one is number four and as you can see as you can see here ranked to is number
one and the sum of these two variables and the sum of these two values is number five.
OK.
After executing the Smurfette it's going I should written this the value of the sum valuable to the
caller.
So who is the color the color of this method is in sight of this.
Uncle.
OK inside of this uncle Smurfette we called this let's roll the dice Meffert.
So the caller is unclear.
OK.
And we assigned that value that somebody the value of that so valuable to these dice some value bet.
OK.
So now with the value of this day somebody's about is five.
And here we are actually assigning the value of these TXI the calculations that take that view.
So as you can see here these are the calculations based view and we are assigning that value to this.
All the calculations value OK.
So this line of code is actually now assigned to this.
All the calculations value.
OK.
And here we actually assign the value 0 to the points value.
And now it can actually go inside of the switch statement.
OK.
And then it's going to actually switch between the values of this song.
So remember now the value of this sum is fine.
OK.
So case 7 11.
So it is not the right case.
Target Class 3.0.
No.
And here we can see the value 5.
As you can see the value of our son is five.
So if we can see this case here and so is going to try to execute these lines of code here these lines
of code.
OK.
As you can see here.
So now it's going actually assign this value status that proceed to these games that is valuable.
So now the value of these games that is valuable is status that proceed.
OK.
And here we are actually assigning the value of these dice them to these points.
OK.
So the value of this day is five.
So now we are actually assigning that value to the Trudy's points valuable.
OK.
Here we are actually saying 3x the calculations that said text all the calculations value as you can
see here.
This is this value this takes.
Here is the value of this.
All the calculations value OK Plus as you can see here we actually assigned that value to our variable
here.
OK.
And here we are saying that plus your point is.
So this is that text.
Your point is called end points.
So now as you can see because we assigned the value of this day some valuable to this our point's valuable.
Here we are showing to the user that he's put his or her points is Phife and here we actually put a
new line character.
And here we said that the game status that it takes to continue the game.
So this is that text and all the text the translations.
Well you your point is plus points as you can see.
Now these are valuable this RTX the calculations value.
Now has this value.
OK.
We assign this value to the sportiest the calculations value break.
And then it's going to break out of the switch statement and then it's going to reach this return statement.
So it's going to actually break out of this entire unclick method.
OK.
So now we need to actually because we can actually continue the game.
We can click on this image again here.
So let's actually click on this image in order to see what happens.
Your point is Phyfe.
So this text here is the result of execution of this line of code.
Here we said your point is plus points as you can see here and newline character.
So we put this text here after this text this line of text here.
And as you can see here now it says your point is five.
So when we actually clicked on that image image view going to actually go inside this and click my foot
again.
And then it's going I tried to check this condition if game status is equal to status that not started
yet.
So it is false.
OK.
They get our game status is status that proceed.
So it's going to actually go here and then it can execute these lines of code here if game status that
status that proceed.
So it is true this condition is true in dice.
Let's roll the dice.
It's going to actually again roll the dice for us.
So it's going to actually go inside this.
Let's roll the dice and then it's going to actually execute these lines of code.
Here again your point is five.
And as you can see here it says this value is our old value OK.
Number five the value of the dice.
OK.
It's going I should execute these lines of code here again.
So this time the value of this rant is number one.
Randall Vaughn is number one and the value of this random two is number six.
So are some of these two values is number seven.
OK.
And it says you rolled one plus six seven.
OK.
And then he's going to return the sum the value of the sum valuable to the caller.
OK so now let's actually go back here and here we are saying that if dice some OK the value dice the
sum is now seven.
OK.
If those is equal two points the value of these points are valuable.
So our point is five and dice some the value of these dice and variable is not equal to 5.
So it's going to actually skip this if statement here and then and then it can actually reach this if
statement here.
As you can see here it says else if dice sum is equal to seven.
So as you can see here now Tyson is 7.
So this condition evaluates to true and then this can actually execute these lines of code inside of
these.
Else.
Else if statement game status is equal to status that last.
So the they use their last game to the game status that said text you lost.
As you can see here match I enjoy is invisible.
So we cannot see that dice image here any more match between real start in visible.
So we can see this restart the game button here again.
OK.
So that was the flow of this program.
So hopefully that makes sense.
Ok everyone.
Now we want to talk about two important points about this project.
First of all as you can see here we've got these cases here.
OK.
So instead of these cases I could just comment out these cases.
Let me just comment on these cases here and instead I could just type in default colon and here as you
can see this the file is the same as just writing.
These are cases here.
OK.
So as you can see here inside this.
Let's roll that Smurfette.
As you can see of these so valuable is actually the value between number one and number two.
OK.
So as you can see here this piece of code here generates a random number between number 1 and number
6.
And this piece of code here is going actually to generate a random number between number one and number
six.
OK so the sum of these two values is going to be of value or random value between number 1 and number
12.
OK.
So here as you can see inside of the switch statement we change some of these conditions and these are
the default conditions.
Case 5:55 case 8 case 9 and case then.