• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2270
  • Last Modified:

Source code for checkers game in VB

I need source code of the checkers game in Visual Basic.  It's for a school project. I need it, please help me. ;-)
0
pascals
Asked:
pascals
1 Solution
 
DalinCommented:
It is not proper to ask someone to do a school project for you.

0
 
FoyalCommented:
Use an array of image or label controls for the grid then check for valid jumps using simple if then statements something like:

Sub Squares_Click(Index as integer)

Select Case Index
  Case 0:
    If Squares(0) = Red and Squares(1)= Black and Squares(2) = Blank then
   Jump 0 1 2 1
    End If
'and on and on...

End Select

End Sub

Sub Jump(ByVal JFrom as integer, ByVal JOver as integer, ByVal JTo as integer, ByVal JColor as Integer)
 
  Dim Color as String
 
  If JColor = 1 then
     Color = "Red"
  Else
     Color = "Black"
  End If

  Squares(JFrom) = Blank
  Squares(JOver) = Blank
  Squares(JTo) = Color


End Sub

You can tune this up alot and do it about a million ways but you should get the idea... as far as the logic of the
computer player, you'll have to work that out yourself...
0
 
JuiletteCommented:
I agree and it seems everybody and their brother does it and the only loser in the game is the person who doesn't take the time to ask.... only what needs to be asked when stuck..
Ie..get a plan..when you get stuck...ask a question.
1.how many squares
2.what control will be my square
3.what happens when I move
etc. etc..etc.
BTY...that is not a little project so you better get busy.

Wayne

PS..if you want to program..PROGRAM
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
pascalsAuthor Commented:
Thanks, but i want a source code of the checkers game, not the chess game !
0
 
GunsenCommented:
Hmmm, here is a link to give u some idea :
http://www.isat.jmu.edu/common/projects/STUDENT/Checkers/

I've made several board games in turbo pascal - way back.
The interesting/tough part is the computer AI, which btw is excluded from the project above. :-)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now