1
00:00:00,540 --> 00:00:12,010
So inside of this Mefford I can just type in between restart game that said visibility view that's invisible.

2
00:00:13,070 --> 00:00:13,780
OK.

3
00:00:13,950 --> 00:00:25,100
Now I can actually create another my fed private voit and this time the name of my method is make our

4
00:00:25,110 --> 00:00:31,610
AMG dice visible OK.

5
00:00:32,030 --> 00:00:39,780
And here inside of the Smurfette I can just type in our UMG dice that set this ability

6
00:00:42,410 --> 00:00:56,640
view that visible I can create another in my first private Voyt match between restart

7
00:01:00,300 --> 00:01:07,170
visible and inside of this perfect I can just typing in between.

8
00:01:07,230 --> 00:01:07,850
Restart.

9
00:01:07,920 --> 00:01:15,970
Jane Dot said visibility view that visible.

10
00:01:16,130 --> 00:01:18,410
OK so hopefully that makes sense.

11
00:01:18,470 --> 00:01:21,690
And now let's actually go back inside this uncreate Mefford.

12
00:01:21,810 --> 00:01:25,410
And now let's actually typing in some other codes.

13
00:01:25,410 --> 00:01:37,740
Here are some lines of code here and here I can just type in make between restarts invisible and I can

14
00:01:37,740 --> 00:01:47,120
actually type in here TXI the game status that said text set text to double quotes.

15
00:01:47,130 --> 00:01:53,430
I want to actually empty the value of this to eight game status when my Actually application is actually

16
00:01:53,430 --> 00:02:02,670
started for the first time he makes the game calculations take such that it takes to double quotes.

17
00:02:02,880 --> 00:02:03,340
OK.

18
00:02:03,390 --> 00:02:05,200
So hopefully that makes sense.

19
00:02:05,280 --> 00:02:10,410
And let's actually run our project here and see what happens on here.

20
00:02:10,500 --> 00:02:14,230
Use the same device for future launches and click on OK.

21
00:02:14,710 --> 00:02:15,020
OK.

22
00:02:15,030 --> 00:02:21,030
As you can see here now our application is actually running on this emulator here and we can only see

23
00:02:21,690 --> 00:02:26,390
this image view this image at the center of this screen here.

24
00:02:26,760 --> 00:02:33,690
And as you can see here inside of this uncreate Mefford I said that's a major B.T. and restart invisible.

25
00:02:33,840 --> 00:02:38,390
So as you can see we cannot see that BT and restart here.

26
00:02:38,970 --> 00:02:46,020
And as you can see I specified that THC games that is that said text to double codes as you can see

27
00:02:46,020 --> 00:02:53,670
we cannot see the value of these TXI the game status and the XTi game calculations as you can see the

28
00:02:53,670 --> 00:03:00,150
calculations here we cannot see those values here because we actually assign the value empty to those

29
00:03:00,390 --> 00:03:02,710
values inside of these uncreate method.

30
00:03:03,060 --> 00:03:06,590
And we can only see it is M.H. view here this image.

31
00:03:06,660 --> 00:03:08,580
So hopefully that makes sense.

32
00:03:08,760 --> 00:03:15,350
And let's go back inside the main activity that up fight here and inside of this are uncreate nefarious.

33
00:03:15,360 --> 00:03:18,660
Let's actually continue adding some more coats.

34
00:03:18,660 --> 00:03:28,080
OK everyone now here that's actually referred to the name of this I am Gittis image that sits on Khaliq

35
00:03:28,080 --> 00:03:32,720
listener new view that unclick listener.

36
00:03:32,720 --> 00:03:33,320
OK.

37
00:03:33,600 --> 00:03:37,250
So as you can see here I am making this image this image view.

38
00:03:37,590 --> 00:03:43,280
So let's actually click on this clear cashier and here I am actually making this image.

39
00:03:43,440 --> 00:03:47,950
You are listening to the clique's that the use or make on this image.

40
00:03:47,990 --> 00:03:48,630
OK.

41
00:03:48,910 --> 00:03:54,840
OK so now let's actually go back and say this main activity that you a fight here and inside this unclick

42
00:03:54,830 --> 00:03:57,190
method it's actually putting some more quotes.

43
00:03:57,210 --> 00:03:57,920
OK.

44
00:03:58,140 --> 00:04:04,020
So first of all it's actually create an if statement here if game status.

45
00:04:04,020 --> 00:04:11,440
So remember we created this game status here in main activity class and in line 55.

46
00:04:11,450 --> 00:04:11,900
OK.

47
00:04:12,110 --> 00:04:17,830
These games that is valuable is actually of type status and this status is actually an arm.

48
00:04:17,940 --> 00:04:18,380
OK.

49
00:04:18,540 --> 00:04:21,440
And if you only accept these values.

50
00:04:21,450 --> 00:04:22,050
Ok.

51
00:04:22,260 --> 00:04:23,370
Not started yet.

52
00:04:23,370 --> 00:04:25,030
Proceed one last.

53
00:04:25,230 --> 00:04:32,110
And here we created this variable and we assigned this status that not started yes value to these value.

54
00:04:32,110 --> 00:04:32,910
Well OK.

55
00:04:33,420 --> 00:04:43,680
So here inside these are if statement here I am saying that if game status is equal to status not started

56
00:04:43,680 --> 00:04:49,950
yet and then it can actually execute these lines of code inside of these if statement.

57
00:04:49,950 --> 00:04:56,730
And this means if the user has not started the game yet then it's going to actually execute these lines

58
00:04:56,730 --> 00:04:59,100
of code inside of this if statement.

59
00:04:59,190 --> 00:04:59,700
OK.

60
00:04:59,880 --> 00:05:06,010
So if the user click on this image here and the user has not started the game yet.

61
00:05:06,240 --> 00:05:11,660
So now we're going to actually execute these lines of code inside of these if statements.

62
00:05:11,650 --> 00:05:12,140
OK.

63
00:05:12,270 --> 00:05:20,970
First of all let's actually create an integer variable int dice some assignment operator typing the

64
00:05:20,970 --> 00:05:24,300
name of AMFA that we haven't actually created yet.

65
00:05:24,360 --> 00:05:33,370
OK let's roll the dice and we haven't actually created this method yet.

66
00:05:33,570 --> 00:05:38,140
So we need to create this method as it can't see the color of this if it is red.

67
00:05:38,340 --> 00:05:44,910
And if I hover my mouse pointer over this red area it says cannot resolve Mefford.

68
00:05:44,970 --> 00:05:46,310
Let's roll the dice.

69
00:05:46,350 --> 00:05:48,220
We haven't declared this left yet.

70
00:05:48,240 --> 00:05:52,100
So here let's actually create Smurfette privates.

71
00:05:52,900 --> 00:05:59,700
So as you can see here the access modifier of RMF it is a private int and the return type of RMF it

72
00:05:59,730 --> 00:06:02,710
is integer and the name of RMF it is.

73
00:06:02,760 --> 00:06:03,950
Let's roll the dice.

74
00:06:03,960 --> 00:06:07,430
So as you can see here I didn't write this.

75
00:06:07,510 --> 00:06:08,700
It named right here.

76
00:06:08,700 --> 00:06:10,040
Let's roll the dice.

77
00:06:10,260 --> 00:06:13,690
I can actually put my own statements inside of the Smurfette.

78
00:06:13,710 --> 00:06:14,250
OK.

79
00:06:14,520 --> 00:06:25,940
So let's actually it's a random number and rant type 1 assignment operator 1 plus secure random numbers

80
00:06:27,970 --> 00:06:29,540
dot next.

81
00:06:29,540 --> 00:06:31,930
Int and an inside Apprentice's.

82
00:06:32,030 --> 00:06:34,200
I can actually put the value 6 here.

83
00:06:34,340 --> 00:06:38,750
So as you can see here this piece of code here is going to actually generate a value of between number

84
00:06:38,750 --> 00:06:41,270
1 and number 6.

85
00:06:41,270 --> 00:06:41,970
OK.

86
00:06:42,350 --> 00:06:48,890
So if we if we didn't actually put this number of one plus here it's going to actually generate a value

87
00:06:49,220 --> 00:06:53,250
or a random value or random number between numbers 0 and number 6.

88
00:06:53,420 --> 00:06:59,660
But if I put the value number one plus this piece of code is going to generate a random number between

89
00:06:59,660 --> 00:07:01,910
number 1 and number 6.

90
00:07:01,910 --> 00:07:02,460
OK.

91
00:07:02,630 --> 00:07:11,150
So let's actually create another integer variable into rand die two assignment operator one plus secure

92
00:07:11,150 --> 00:07:15,890
random numbers that next int 6.

93
00:07:16,550 --> 00:07:17,340
OK.

94
00:07:17,920 --> 00:07:26,700
And some assignments operator rant die one plus Rand die two.

95
00:07:26,970 --> 00:07:39,150
OK so now let's actually refers to the name of this TXI the calculations that said text as three in

96
00:07:40,290 --> 00:07:41,910
that format.

97
00:07:42,330 --> 00:07:43,160
OK.

98
00:07:43,620 --> 00:07:57,300
All it takes the calculations value plus to double quotes you wrold percent the plus person the assignment

99
00:07:57,330 --> 00:08:06,460
operator person the percent end and this person in here is going to actually create a new line character

100
00:08:06,470 --> 00:08:11,060
OK here as you can see this you're familiar with this piece of code.

101
00:08:11,060 --> 00:08:14,520
This is actually a static effect inside of this string class.

102
00:08:14,550 --> 00:08:18,470
And I told you about this concept in the previous tutorial.

103
00:08:19,010 --> 00:08:22,880
And this piece of code is going to generate a string value.

104
00:08:22,910 --> 00:08:25,160
It's going to return as a string value.

105
00:08:25,430 --> 00:08:29,480
And here we are saying that all the calculations value.

106
00:08:29,540 --> 00:08:34,370
This is a value bet that we actually created here in line for free.

107
00:08:34,460 --> 00:08:37,730
And we're saying this empty value here to this variable.

108
00:08:37,970 --> 00:08:43,780
Plus you rolled a person D-plus percent the person the assignment operator person did.

109
00:08:43,850 --> 00:08:50,450
So now we need to actually specify the arguments that are that are actually related to these are specifiers

110
00:08:50,500 --> 00:08:52,690
to these format specifiers here.

111
00:08:52,730 --> 00:08:56,940
So for the person you need to actually put an argument of type integer.

112
00:08:56,940 --> 00:09:00,090
OK so Rand dog one.

113
00:09:00,500 --> 00:09:01,140
OK.

114
00:09:01,170 --> 00:09:03,330
Come on Rand.

115
00:09:03,480 --> 00:09:04,060
Day.

116
00:09:04,130 --> 00:09:07,050
That is actually related to this person the camera.

117
00:09:07,070 --> 00:09:13,460
And then we need to actually again put in an argument of type integer that is actually related to these

118
00:09:13,960 --> 00:09:14,980
specifier here.

119
00:09:14,990 --> 00:09:15,470
OK.

120
00:09:15,650 --> 00:09:16,690
So some.

121
00:09:16,910 --> 00:09:18,580
So hopefully that makes sense.

122
00:09:18,740 --> 00:09:24,490
And then we need to actually turn the value of these really some value.

123
00:09:24,630 --> 00:09:26,650
Some.

124
00:09:26,760 --> 00:09:28,410
And as you can see here.

125
00:09:28,530 --> 00:09:32,070
So as you can see the name of this Meffert is not right.

126
00:09:32,370 --> 00:09:33,830
Let's roll the dice.

127
00:09:34,110 --> 00:09:34,880
OK.

128
00:09:35,340 --> 00:09:39,860
So now as you can see here are inside of this statement.

129
00:09:40,110 --> 00:09:45,970
As you can see inside of this image I introduced that Stokley listener and inside of his uncle Mefford

130
00:09:46,020 --> 00:09:48,190
here we created an if statement.

131
00:09:48,360 --> 00:09:55,290
And inside of this statement I created an integer number or an integer variable called dice sum.

132
00:09:55,560 --> 00:09:58,960
And here we are assigning are the returned value of this method.

133
00:09:58,980 --> 00:09:59,770
OK.

134
00:10:00,300 --> 00:10:06,260
So now let's actually continue adding some more lines of code here.

