checker game development - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

checker game development

enzomatrixenzomatrix Posts: 1Member
dear friends,

I would like to ask some help. I am a beginner in vb.net programming and right now we have a thesis in school to develop an Application of Programming to Chemistry Dama. I already have a sample codes that I attached.

The problem that I have right now is how can I capture 2 or 3 chips in one move. The code that I have is for capturing 1 chip per move. Need some help to have some idea on how I can modify my codes.

Thank you

sample code that I have in my program

'-----single chip taken-----------------'chip 9
If picCheckers9.Location = square17 And picCheckers13.Location.X > 307 And picCheckers13.Location.Y > 189 And Open14 = True And Open17 = False Then
picCheckers13.Location = square14
str13 = 14
Open17 = True
Open14 = False
Open21 = True
picCheckers9.Location = square40
lblTurn.Text = "Red"
'TextBox1.Text &= Environment.NewLine + "Al 4,3 Al ------ -- -62"
DataGridView1.Rows.Add(New Object() {"Al", "3,4", "Al", "AlAl", "-54"})

'----extra for double taken chips----- chip 9
ElseIf picCheckers9.Location = square17 And picCheckers1.Location = square9 Or picCheckers2.Location = square9 Or picCheckers5.Location = square9 Or picCheckers6.Location = square9 And picCheckers13.Location.X > 307 And picCheckers13.Location.Y > 189 And Open14 = True And Open17 = False And Open9 = False And Open5 = True Then
picCheckers13.Location = square14
str13 = 14
Open17 = True
Open14 = False
Open21 = True
picCheckers9.Location = square40
'lblTurn.Text = "Red"
'TextBox1.Text &= Environment.NewLine + "Al 4,3 Al ------ -- -62"
DataGridView1.Rows.Add(New Object() {"Al", "3,4", "Al", "AlAl", "-54"})
'----extra for double taken chips-----

'Else
'lblTurn.Text = "Red"

Sign In or Register to comment.