VB.NET

Moderators: seancampbell
Number of threads: 4020
Number of posts: 10026

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
checker game development Posted by enzomatrix on 30 Nov 2012 at 7:19 AM
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"




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.