Click here to Skip to main content
       

Visual Basic

 
AnswerRe: Missing Toolbar PinmemberPeter_in_27806-Dec-12 13:08 
AnswerRe: Missing Toolbar PinmemberEddy Vluggen6-Dec-12 14:23 
QuestionHow to insert xml to dataset.xsd using vb.net? PinmemberAkbarblack5-Dec-12 19:20 
QuestionDrawing an image onto a form Pinmembertuffhamster2-Dec-12 8:13 
AnswerRe: Drawing an image onto a form PinmemberEddy Vluggen3-Dec-12 0:53 
Questionprogramming thesis VB.net Pinmemberenzomatriz30-Nov-12 14:48 
AnswerRe: programming thesis VB.net PinmvpDave Kreskowiak1-Dec-12 3:17 
AnswerRe: programming thesis VB.net PinmemberZaf Khan1-Dec-12 10:01 
Hello Enzomatriz,
 
It looks like a game of checkers?
And you say your code to take one chip works?
 
Ok so as I see it maybe you can place the (YOUR CODE) code block which takes the oppositions chips in a LOOP where, after taking one chip you see if there are other chips to take (as partof the same same move using the same peice/chip/counter that you use to make the initial move and if not another then obviously let the otherplayer have his/her turn.
 
So to explain roughly you would end up with....
PSEUDO CODE
===========
 
Start game
  Player 1 turn (your code)
    My_Turn_Complete = False
    My_Turn_Partial = False
    Do
      'The next line looks for pieces that can be taken by your Piece
      If I can take opposition pieces Then
        Take oppostion peice
        YOUR CODE FROM HERE
        'i have started a move which may let me take take more pieces
        My_Turn_Partial = True 
      ElseIf My_Turn_Partial = true Then
        'I took opposition peice and no more can be taken (so my turn is finished now)
        My_Turn_Complete = True
      Else
        'I could not take any opposition peices 
        'and My_Turn_Partial was false so i will defend my lines
        YOUR CODE HERE (to defend your lines NOT take oppososiotn peices
        My_Turn_Complete = True
      End IF
    Loop until My_Turn_Complete
  Player 2 turn
    Let player 2 make his/her move
Loop until end of game 
 

There is a bit more than above obviosuly,
because you cannot use a different piece/chip/counter once you have started a move,
so you need to check if its the same piece that allows you continue.
but i think there is enough above to give you an idea
QuestionTAPI3 Call Id ?? Pinmembertrashambishion30-Nov-12 11:20 
AnswerRe: TAPI3 Call Id ?? PinmemberEddy Vluggen30-Nov-12 23:36 
GeneralRe: TAPI3 Call Id ?? Pinmembertrashambishion4-Dec-12 9:30 
GeneralRe: TAPI3 Call Id ?? PinmemberEddy Vluggen4-Dec-12 10:12 
GeneralRe: TAPI3 Call Id ?? Pinmembertrashambishion6-Dec-12 12:19 
QuestionLoad pdf into picturebox binding to dataset Pinmemberwaner michaud30-Nov-12 9:10 
AnswerRe: Load pdf into picturebox binding to dataset PinmvpDave Kreskowiak30-Nov-12 12:43 
GeneralRe: Load pdf into picturebox binding to dataset Pinmemberwaner michaud4-Dec-12 9:13 
GeneralRe: Load pdf into picturebox binding to dataset PinmvpDave Kreskowiak4-Dec-12 12:31 
QuestionSaving a form and its contents as an image Pinmembertuffhamster30-Nov-12 4:37 
AnswerRe: Saving a form and its contents as an image PinmemberEddy Vluggen30-Nov-12 23:41 
GeneralRe: Saving a form and its contents as an image Pinmembertuffhamster1-Dec-12 3:18 
GeneralRe: Saving a form and its contents as an image PinmemberEddy Vluggen1-Dec-12 4:04 
QuestionActivex can't create object error in VB6.0 PinmemberPradeep Londhe29-Nov-12 22:49 
AnswerRe: Activex can't create object error in VB6.0 PinmemberDeepak Shitole14-Dec-12 21:25 
QuestionActivex can't create object error in VB6.0 PinmemberPradeep Londhe29-Nov-12 22:49 
AnswerRe: Activex can't create object error in VB6.0 PinmemberSimon_Whale29-Nov-12 22:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 23 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid