00:01
In this question, we have to create a game, connect four games using c sharp programming language.
00:06
So the idea is what we will do first, we will create a program class.
00:16
Then after that, we will create our game controller.
00:27
After creating our game controller class, what we will do is we will create players.
00:33
So one is human player and another is computer player.
00:44
So this is how we will divide our program into different different classes and functions.
00:51
So let's jump to the code and i'll set there.
00:59
So this is a c sharp compiler.
01:01
I'm using an online c sharp compiler.
01:03
So let's clear all this and start from.
01:08
So it's a program instead of typing line by line, i'll explain you the main code by copying pasting these code snippets in this program interface.
01:20
Because if i type line by line, the video will become too lengthy.
01:27
So first we have to create the program class.
01:30
So what we will do is we will create class program inside it.
01:38
We will run our main function.
01:40
So this program class is the main entry point of the whole program.
01:47
Okay.
01:47
So after inside this program class, after running the main function, we will call connect for game controller.
01:55
This is the function of a controller system that we will create in future.
02:01
So after calling this class, we will use game controller to call start game function inside the connect for game controller class.
02:13
So let's create the connect for game controller.
02:17
Now this is the class of connect for game controller that we called here.
02:28
Okay.
02:28
So when the game will start, this connect for game controller will call the start function where it is.
02:37
We will see in future.
02:38
So inside the connect for game controller, we have created some private variables like connect for game model, game model, player, player one and player two.
02:50
Now in connect for game controller function inside connect for game controller class, we have initialized the game model and players.
03:02
So game model we have given to connect for game model.
03:08
So whenever this call class is called, this will initiate first.
03:14
Then player one is initialized to human player and player two is initialized to computer player.
03:20
These both functions will create in future.
03:26
So this next is start game function.
03:31
So this is the start game function that we called it here...