This lesson is going to be for those of you that want something more visual in the earlier lessons,
we set up a really simple dice rolling where we've got the number on the left side.
So for the player and a number on the right side for the second player, so I can be player, computer
and so on.
So every time we press the roll, we get one winner out of the two and sometimes we also end up on a
draw.
So I know some of you like a more visual representation.
This is where we can add in the Unicode Decimal Code, which is represented, and there's a number of
websites online that you can search this and find all of the different decimal codes, the AFC codes.
So it is going over to a website called Code Table, and it's going to show us that the Unicode Decimal
Code and no sign 98 57 is a two.
If we go to number six, it's a one.
And if we go to number eight, it's going to be a three and so on.
So that's what we can represent and output these unique codes into our visuals.
So we don't just have the numbers, we can actually have a visual as well.
So let's add that in and we can do that really easily where we've got our starting number.
And we saw that they were all in sequence.
So if we start at 98, 55 and we add our number to it, that's going to actually give us the value here
within the decimal number, plus whatever the number was that we generated there.
And then we also need to add in the semicolon and we can return back the number.
Plus, let's add in a space here.
We need to update this.
So I just got to change this to NP so we don't have any conflicts because we are using NUM within the
arguments.
So it's refresh one more time, try that out and you can see now we're returning back the actual visual
dice with a number.
So this is a lot more appealing to players that they can see something visual as well.
And it wasn't a really big fix because we were already outputting that value and all those values out.
So go ahead and try this out, add this fix in for yourself into your application and keeping in mind
there's a lot of really neat decimal codes that you can make use of that.
Add in quick visuals instead of just the character numbers into your games.
And they get treated just as any other text does.
Where we've got a large font size, it makes them large as well.