1
00:00:00,450 --> 00:00:01,730
High and I'll come back.

2
00:00:01,730 --> 00:00:08,190
So for me I've managed to have a functioning game that plays properly the way we expect it in only one

3
00:00:08,190 --> 00:00:08,570
mode.

4
00:00:08,610 --> 00:00:13,250
That is a four by four and we can play and everything is the baby we're hoping is going to be.

5
00:00:13,350 --> 00:00:18,390
Now in this lesson we have to deal with this but we have to add new function that is to a game that

6
00:00:18,390 --> 00:00:22,450
we can play it in four by four six five six seven eight by eight months.

7
00:00:22,620 --> 00:00:25,170
So let's go ahead and see how I'm going to do that.

8
00:00:25,200 --> 00:00:26,320
If you remember.

9
00:00:26,340 --> 00:00:31,840
You know what we already have a function called Game Mode which is somebody here.

10
00:00:31,890 --> 00:00:37,940
This one you control the game mode which is already connected to an outlet up here which is a segment

11
00:00:37,960 --> 00:00:38,970
that's controlled.

12
00:00:39,000 --> 00:00:48,180
So the first thing after do I have to get that I'm going to say if let my save the city or is a sender

13
00:00:48,820 --> 00:00:52,060
as you guys segmented the control.

14
00:00:52,140 --> 00:00:57,810
Then I want to do the stuff in here I want to find out which of these is selected.

15
00:00:57,870 --> 00:01:03,460
So I want to go ahead and say let's index becomes my sake.

16
00:01:04,140 --> 00:01:06,750
The select segment index.

17
00:01:06,750 --> 00:01:12,350
So if you have stopped on something that is of the type you segment it's control.

18
00:01:12,360 --> 00:01:17,820
I want to find out which one of them you have clicked on or which one of them is currently selected.

19
00:01:18,060 --> 00:01:20,880
If you found that index I may call it index.

20
00:01:20,890 --> 00:01:28,570
So it makes more sense now when I say let's switch index and let it autocomplete is better.

21
00:01:28,650 --> 00:01:29,370
Which it doesn't.

22
00:01:29,370 --> 00:01:30,410
For me it's OK.

23
00:01:30,480 --> 00:01:33,900
So I'm going to say switch index I'm the switch of index.

24
00:01:33,900 --> 00:01:34,980
I want to do these things.

25
00:01:35,010 --> 00:01:39,000
I want to say case 0 then game mode.

26
00:01:39,010 --> 00:01:43,500
It has to become four in case.

27
00:01:43,590 --> 00:01:48,620
This was one then obviously game mode has two becomes six.

28
00:01:48,900 --> 00:01:57,290
And in case this was two then game mode has to become eight high the default mode.

29
00:01:57,750 --> 00:01:59,030
I don't want to do anything.

30
00:01:59,070 --> 00:02:04,630
I just want a break and that's all we have to do for our game mode function.

31
00:02:04,650 --> 00:02:08,660
What it does is let me see if I can reformat this a little bit better.

32
00:02:08,760 --> 00:02:11,940
What it does is they get a segmented console.

33
00:02:11,940 --> 00:02:15,900
It finds out which one of these three indexes are selected.

34
00:02:16,080 --> 00:02:23,480
If it is zero sets the game to four if it is one sets the game to six if it is two sets the game more

35
00:02:23,490 --> 00:02:24,570
to eight.

36
00:02:24,570 --> 00:02:31,640
And now our game mode has a new value but it doesn't really do anything unless we do this and then had

37
00:02:31,640 --> 00:02:39,810
to reset or as an alternative I could say well if you get this part then reset the game anyway.

38
00:02:40,350 --> 00:02:41,800
Reset action.

39
00:02:41,960 --> 00:02:49,380
And now it sets a new game mode and resets the game on the fly as someone taps on any of these three

40
00:02:49,380 --> 00:02:50,090
buttons.

41
00:02:50,250 --> 00:02:52,440
Let's go ahead and see how that's going to play.

42
00:02:52,440 --> 00:02:58,170
I'm going to run the application and now I should be able to tap on any of those three and get a new

43
00:02:58,470 --> 00:03:04,990
interface for my 4 6 by 6 8 by 8 which I dare to you trying to solve it.

44
00:03:05,000 --> 00:03:10,770
SEVENZO hand one is obviously rather difficult six by six might be a little bit easier.

45
00:03:10,770 --> 00:03:17,490
16 and 12 and 17 and 9 and 14 and I couldn't get even one of them even on a 6 by 6.

46
00:03:17,490 --> 00:03:23,970
I think the most playable one is actually just four by four at least for someone I'm not all that bright

47
00:03:23,970 --> 00:03:25,260
when it comes to these things.

48
00:03:25,260 --> 00:03:32,340
So for like 4 6 6 8 8 and that's all we have to do in this lesson we now have a fully functioning game

49
00:03:32,430 --> 00:03:33,800
that counts that time.

50
00:03:33,870 --> 00:03:39,840
You can play it in different moods every time that you reset everything resets properly.

51
00:03:40,080 --> 00:03:42,880
No two trials can be selected at the same time.

52
00:03:42,930 --> 00:03:49,380
Different modes they provide different levels of complexity and everything up until this point is based

53
00:03:49,380 --> 00:03:57,300
on text values that are numeric 4 and 6 or if you want to do will actually put words in the sky in a

54
00:03:57,300 --> 00:04:00,750
sky and rain and rain or anything that you want to think of.

55
00:04:01,020 --> 00:04:05,610
The next thing we have to do and that's what's coming up in the next lesson is how we can change these

56
00:04:05,610 --> 00:04:08,850
to become images and not just text.

57
00:04:08,850 --> 00:04:11,910
So bear with me and we'll go to our next lesson.
