When I was in my first year of software engineering, I made a Ludo game using the C# Windows Form App. When it was being started, I realized that it will be tough to make a perfectly running Ludo Game in two months with only one more group member who can help. My respected teacher gave me only one hint that you can use "Arrays" to save the path and then we started. In the end, it was not so good but running fine and we got good Data Structures and OOP skills for a project and very good grades.
- Microsoft Visual Studio(I prefer 2010 or above for this)
- Some knowledge and practice on C# and Windows Form App
- You must have met with "Mr. Arrays" including 2-D Arrays.
{
//these arrays
will be used to store x and y axis of blocks in Ludo Game
public int[]
rx_axis = new int[57]; //rx_axis array means x-axis path of
Red token
public int[]
ry_axis = new int[57]; //ry_axis array means y-axis path of
Red token
public int[]
yx_axis = new int[57]; //yx_axis array means x-axis path of
Yellow token
public int[]
yy_axis = new int[57]; //yy_axis array means y-axis path of
Yellow token
public int[]
bx_axis = new int[57]; //bx_axis array means x-axis path of
Blue token
public int[]
by_axis = new int[57]; //by_axis array means y-axis path of
Blue token
public int[]
gx_axis = new int[57]; //gx_axis array means x-axis path of
Green token
public int[] gy_axis = new int[57]; //gy_axis
array means y-axis path of Green token
}
private void
rgister_blue_Click(object sender,
EventArgs e)
{
if (cntb == 0) // zero means not registered yet
{
textBox1.Visible = true;
textBox1.Location = new Point(463, 102);
textBox1.Text = "Enter Name".ToString();
textBox1.Select();
rgister_blue.Text = "OK".ToString();
cntb = 1;
}
else if(cntb ==1)
{
textBox1.Visible = false;
label2.Text = textBox1.Text;
rgister_blue.Enabled = false;
blue1.Visible = true;
blue2.Visible = true;
blue3.Visible = true;
blue4.Visible = true;
button1.Enabled = true;
cntb = 2;
}
}
1 Comments
Could you post the rest of the code for the Ludo game
ReplyDelete