Here even so in the last video we have created of a battle.
Now we will move further.
But at this point we are something like We don't know what to do next.
Like where to begin and how can I do these things.
Do I have to search the Internet and a lot more things are going in your mind.
Well the thing here is if you know what you need to do and you have a clear idea.
Go for the functions otherwise try to write the main logic.
Then you will find the things one by one.
And also you need to go to the Internet.
So he'll we have an idea that what we need to do that is basically I'm representing you and that's something
if you look at your schedule let me show you that one
then.
Have you noticed this one clearly then posting you notice the X there is something that is creating
the x.
Second thing the X are falling third there colorful X after that one when we came to the bottom we notice
this one this thing moving that is look like a bowl and we are entering this one as a catcher.
So this is actually catching the x.
Now how about programming is catching the X so that is something and at the point came in focus.
After that one what if the egg drop.
Then who would notice that the egg is actually dropped and there is no drop in the boat.
So this is another thing here that is making sure that is the egg drop or catch after that one when
the egg is dropped.
It would make sure that life is decreased and when the egg is sketched it is taking care of their score
is going to be increased and is increasing by 10 with each factor.
After that when the last thing that went did three eggs are drop the game you need to show the final
score that it is scored and that time so main thing here that we had the idea what we need to do like
all the things stay out of tasks.
So we will perform these tasks one by one we will create the functions for each thing and call them
according to their need.
So let's begin with that one.
And if you don't have idea for your program again I would suggest to go for the main logic that is you
in your mind one by one.
Everything we get solved.
So now first of all before moving to the working here in this video I will create the things like before
making the eggs fold or eggs created one by one.
I need to define the egg.
That how it looked likes I need to define the catcher that what its shape so there is something different
from the working so I am doing these in a separate video and of working in the next videos.
So first of all I will define the egg.
Now you have noticed there that colorful eggs they are getting different colors one by one.
So for that one we have imported this cycle.
We will define a list that contains a number of colors and the cycle will choose a color one by one.
So a variable color cycle it is a list and that contains colors like say light blue
light pink.
After that one light yellow then we have see light left open
or is it green because I don't know is did any like purple color then red.
Here I am adding two more colors than the demo.
Blue green and see also black eggs.
So that's something or possible but also the colorful exact opposite.
And I I'm adding and penalties.
I will tell you what that is now.
Here I have a list that contains a number of colors so of function with select a color one by one and
they will be shown on the X and how will I do that one.
I would just write here cycle Nagle and this one in the cycle so it will select every color one by one
from this one and provided this one too.
After that one the dimensions of X say Edward is equal to 45 an egg height is equal to fifty five after
that one.
Something like on catching egg.
What will be the incrementing score.
So that will be denoted by x goal and there is going to be 10.
So an incremental 10.
Now after this one three variables that you will not understand right now but understand later and are
already familiar with you but their values are not x speed 500 in double the 4000.
After that one difficult defector you will get this one and its value also
so this one is something like increasing speed.
When you catch each week so it's going to be zero point nine five.
And we will multiply this one letter with diligence paid so implementing the speed of disaffected Nagel.
So this is all about the EC.
Now we will go for the catcher so first of all catch us.
Color is same all round a game that is actually blue.
After that one I run my program
then if you notice this one this is actually in middle of the.
Say this one is to compete with it so it is accurate.
And it is all about the height then that one is not in the middle of height.
This is in bottom and with the little gap here.
Like this one is actually 20 and its shape is something like this curve which is not exactly 180 degrees
because if you notice this one this is something less than the line and here also less than denied look
like something 160 degrees tending the LEDs from each side.
After that one it's empty from inside.
So we just need to create an arc.
So let's go for that one.
So for an arc we simply require x not why not an X one white but the coordinates of that one.
And basically the X not and why not for this one are simply x.
Notice the complete width here taking the half of this one.
So like that one here we have this one and then minus catcher it half from this one.
So that is something this part.
So we will get to this point I will tell you this will again complete would have led up to this but
from this point to this point and now from this point I will minus the catcher with top the catch of
its half is total dismount from this point to this point and then I minus this part this portion I will
get to this point and I hope you get this one.
And if I talk about the height then the total height set up to this one minus the catcher height whatever
the is.
So I will get approximately at this point where my groceries.
And then I will need two minus and factor from this is say 20 I will get to this point because this
is not touching the bottom and then the X1 by I've been defined with these variables by adding some
factories in this like if this is X not then I would just add division to pull this one this compute
ketchup plus this one so I will get to this point I think you understand that well because they're very
easy to understand and they get your height will be high that I have created here plus the get you.
So let's do that one and I hope you get this one more you will get when I do this one here.
So first of all I will define two variables here.
First one Cacho would say a hundred and then Cacho.
I think this is a little mistake on CHP CAGR lady you get your height.
This will also.
Hundred and now the two points that is X then why not.
I will name them Cacho underscore start underscore X that is denoting the start point and the second
one is get your underscore start underscored why and the ending points will be captured and the scores
start x 2 and 4 right.
This is going to be getcha underscore start underscore white labial and now X is very simple as I have
told you the complete canvas would have minus the catcher with tough so good cheer underscored would
be divided by two liberty and no get a height that is canvas height and I'm digging complete one here
because that is not in middle that is actually bottom minus catcher height not the low navel and some
factor minus 20 I'm taking him.
If you want a little dough bottom then you can take this one less order up and then you can dig this
one right after that.
The ending point and they will be very simple just the original one that one plus it's complete with.
So if that is there then it will go up to this point.
So just catcher with your And again this one also very simple just the regional one plus get your height.
David go.
So we have defined all the default points and I hope you understand that how I have defined these.
Now I will create the catch you taking a variable catcher and creating any drawing and canvas is very
easy to just see or create.
And this is actually an OK.
So create endoscope.
OK.
And if you remember this required for points x note y note X1 light one and they are basically over
these points.
So just add them here.
Come on see this one X not this one why not
this one X1 and this one y one go.
So here I hope you find all default points after that one.
Few things like an arc if you remember with these points also require the angles like from where to
begin and up to extend.
So start angle.
I have already can correct that one is going to between 230 and the extent angle is equal to one hundred
and forty.
So they are not exactly 180 degrees after that one feel things like style that is going to be an arc
and the outline here in the outline we just provide the color if we want to feel the color inside then
we will take another parameter.
But now we require only the boundary to be color.
So this will be catch your color variable because that is blue.
After that one word I'm taking three here.
So this is about defining the again kitchen.
If you save this one and run item three wonder boy.
There you go you will get this one exactly the same like the demo of an origin like catch it would be
white just here not exactly 180 exactly in middle of food and at nearly bottom of height so there actually
about getcha.
Here it is and now in the next video I will just show you that how you can add some more interface elements
like this golf the lives and then we will begin that how we can make this one life so that it will work.
So thanks for watching.
I hope you understand.
And this one is a little typical video about the coordinates if you get any doubt and just ask me so
soon the next video.