Hello, friends today.
I will tell you.
One game related to two dice.
In this case, the user just put a number that is a combination of.
Number appeared on two dioceses.
Let's say, on the first dice.
The user gets.
One.
And on the second dice the user gets three.
The combination is four.
And if the user.
Initially select for in that case, both.
The combination is both the combination are equal in this case and it will generate a reward for the
user.
So let's create a lab view for that purpose.
So just put.
Create a new over here.
In this case, I just select one random number.
As in my previous video or in this case, the upper bound for the dice should be six because the maximum
number mounted on the dice is six and the lower number mounted on the dice is one.
In this case, I just need two random numbers because I have two dice in this case.
So let's create indicator for this.
Create.
This is my dice one.
Now create four second dies.
Create indicator for dies to.
Okay, So right now I have two dices.
So this is the dice one.
This is Dice two.
Now, I want to just apply addition because I need combination of these two.
Just connect this over here.
I just got the combination.
Yeah.
Of two dioceses.
Now I just select a number that is initially selected by the user, so just make it integer type.
Just go to representation.
So go to comparison.
When both are equal means combination and the number selected by user.
Both are equal.
So over here I just make it to 64 by 64.
So that quotient dot removed.
Just delete this again.
Connect this person.
Dot is again over here it is unsigned number, not integer, just make it unsigned 64 person dot removed
so it will generate a true signal.
Just want to stop the loop.
Just put a while loop over here.
Just connect it to my while loop and this is my iteration loop iteration and.
Just connect it over here.
Over the edge.
Make a increment because iteration starts from zero.
Connect it so it will give me after how many loop iterations or how many.
Times.
I just got that combination after how many times?
By playing the two dice or by running the two dice.
I just got the combination.
So over here, this is my match.
So just go to the.
Front panel just make it more decorative.
So for that purpose, I just drag.
I initially save a video, not a video.
I just import a picture.
As you see over here, this is my dice.
So just paste it.
So this is my one dice.
Let's say just paste another dice.
Over here.
This is my second dice.
Let's check the size.
The size is same right now.
So this is my one dice.
This is my second dice.
Just replace this dice.
Right now.
Over here.
The number.
I got.
Let's say it is.
This one.
So just remove its label.
So over here, I got the number from first dice over here.
This is my second dice.
Just again, increase the size.
Just remove its label also.
So over here I got the myrrh from second dies.
And over here.
This is the number by user.
Or combination by user.
Okay, so let's say just boiled it also and increase the size.
So over here and just replace this function with a slider.
Change with the slider.
Horizontal style slider I'm using in this case.
And as we know, the combination.
Of these two.
The minimum number appeared on these two dice is two and the maximum number appeared on these two dice
is six plus six, that is 12, and minimum number is one plus one that is 12.
So I just make it like this increase the size of this.
So over here, I just put the number and I just use a digital display over here to check what is inside
this.
So create size over here.
Over here.
We got the combination of these two.
Just replace it.
Whether.
More.
Visual display indicator.
So here, this is my the maximum number again, it is 12.
And the minimum number it should be two.
So again, just create a digital display over here to check what is.
Inside this.
And this is my match.
After how?
Many times by playing these two dice.
I just got the match that is selected by the user.
So let's create.
Increase the size first.
And just again change its size.
Also change its size.
So right now, when I hit on run button, let's first number the first combination, it should be eight.
This eight.
Have.
Many combinations like first case.
When two and six is there, it will give me.
Eight and this match will comes after 27 times when I just run the two dices.
Another combination again.
Now six two on the first dice.
I just got six.
On the second dice.
I got two, Three plus five again.
Eight.
Three plus five.
Five plus three.
After the second match, I got means.
First time I just draw the these two dice.
I didn't get the combination eight on the second time I just got the match.
Five plus three again in the third match.
I just got the.
Eight.
So this is how you can create two dice example in.
LabVIEW.
Or you also create your combination.
Like in this case, I'm just using the sum of the two dices.
Let's say we want to just check on when, in which case or after how many cases we just got the same
value on the two dices.
In that case, you just remove this symbol from here.
Just.
Place.
Just remove this one also, because in that case I just only place our dices or means run over our dices
and the both the combinations would be equal.
In that case, you just combine or you just compare the values from these two dices.
Just delete this one.
Also, let's let's again run it in this case, remove broken wires, run it.
We got four four after.
Fortement means for iteration two.
Two after two.
Iteration.
One one.
Five.
Four, four, three, three, two, two.
551166 after.
One match means in the first case, when I just draw the random number, we got six six.
So this is how you can create any logic with your two dice example.
So I just again.
Go to my previous one.
Just save it to this case.
To dice some.
On the desktop.
I'm just saving it.
So this is all about today's lecture.
Thank you.