Click here to Skip to main content
15,881,089 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Missing Toolbar Pin
Peter_in_27806-Dec-12 13:08
professionalPeter_in_27806-Dec-12 13:08 
AnswerRe: Missing Toolbar Pin
Eddy Vluggen6-Dec-12 14:23
professionalEddy Vluggen6-Dec-12 14:23 
QuestionHow to insert xml to dataset.xsd using vb.net? Pin
Akbarblack5-Dec-12 19:20
Akbarblack5-Dec-12 19:20 
QuestionDrawing an image onto a form Pin
tuffhamster2-Dec-12 8:13
tuffhamster2-Dec-12 8:13 
AnswerRe: Drawing an image onto a form Pin
Eddy Vluggen3-Dec-12 0:53
professionalEddy Vluggen3-Dec-12 0:53 
Questionprogramming thesis VB.net Pin
enzomatriz30-Nov-12 14:48
enzomatriz30-Nov-12 14:48 
AnswerRe: programming thesis VB.net Pin
Dave Kreskowiak1-Dec-12 3:17
mveDave Kreskowiak1-Dec-12 3:17 
AnswerRe: programming thesis VB.net Pin
Zaf Khan1-Dec-12 10:01
Zaf 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 ?? Pin
trashambishion30-Nov-12 11:20
trashambishion30-Nov-12 11:20 
AnswerRe: TAPI3 Call Id ?? Pin
Eddy Vluggen30-Nov-12 23:36
professionalEddy Vluggen30-Nov-12 23:36 
GeneralRe: TAPI3 Call Id ?? Pin
trashambishion4-Dec-12 9:30
trashambishion4-Dec-12 9:30 
GeneralRe: TAPI3 Call Id ?? Pin
Eddy Vluggen4-Dec-12 10:12
professionalEddy Vluggen4-Dec-12 10:12 
GeneralRe: TAPI3 Call Id ?? Pin
trashambishion6-Dec-12 12:19
trashambishion6-Dec-12 12:19 
QuestionLoad pdf into picturebox binding to dataset Pin
waner michaud30-Nov-12 9:10
waner michaud30-Nov-12 9:10 
AnswerRe: Load pdf into picturebox binding to dataset Pin
Dave Kreskowiak30-Nov-12 12:43
mveDave Kreskowiak30-Nov-12 12:43 
GeneralRe: Load pdf into picturebox binding to dataset Pin
waner michaud4-Dec-12 9:13
waner michaud4-Dec-12 9:13 
GeneralRe: Load pdf into picturebox binding to dataset Pin
Dave Kreskowiak4-Dec-12 12:31
mveDave Kreskowiak4-Dec-12 12:31 
QuestionSaving a form and its contents as an image Pin
tuffhamster30-Nov-12 4:37
tuffhamster30-Nov-12 4:37 
AnswerRe: Saving a form and its contents as an image Pin
Eddy Vluggen30-Nov-12 23:41
professionalEddy Vluggen30-Nov-12 23:41 
GeneralRe: Saving a form and its contents as an image Pin
tuffhamster1-Dec-12 3:18
tuffhamster1-Dec-12 3:18 
GeneralRe: Saving a form and its contents as an image Pin
Eddy Vluggen1-Dec-12 4:04
professionalEddy Vluggen1-Dec-12 4:04 
QuestionActivex can't create object error in VB6.0 Pin
Pradeep Londhe29-Nov-12 22:49
Pradeep Londhe29-Nov-12 22:49 
AnswerRe: Activex can't create object error in VB6.0 Pin
Deepak Shitole14-Dec-12 21:25
Deepak Shitole14-Dec-12 21:25 
QuestionActivex can't create object error in VB6.0 Pin
Pradeep Londhe29-Nov-12 22:49
Pradeep Londhe29-Nov-12 22:49 
AnswerRe: Activex can't create object error in VB6.0 Pin
Simon_Whale29-Nov-12 22:53
Simon_Whale29-Nov-12 22:53 

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

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