Click here to Skip to main content
15,861,125 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Gerry Schmitz20-May-22 5:30
mveGerry Schmitz20-May-22 5:30 
QuestionRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Eddy Vluggen20-May-22 6:08
professionalEddy Vluggen20-May-22 6:08 
AnswerRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Gerry Schmitz21-May-22 5:36
mveGerry Schmitz21-May-22 5:36 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Jo_vb.net20-May-22 6:21
mvaJo_vb.net20-May-22 6:21 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Jo_vb.net29-May-22 0:42
mvaJo_vb.net29-May-22 0:42 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Gerry Schmitz29-May-22 4:58
mveGerry Schmitz29-May-22 4:58 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Eddy Vluggen20-May-22 6:07
professionalEddy Vluggen20-May-22 6:07 
GeneralRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Jo_vb.net20-May-22 6:26
mvaJo_vb.net20-May-22 6:26 
Thanks a lot for this detailed answer.

But I'm only on a better beginner level in coding...

I use already subs in my loops and I really don't understand how
Quote:
Remember that "xyz".Contains("c")? Imagine xyz and c coming from a file? It wouldn't be rules based, but halfway. If you can do that, we'll go from there to make actual rules

could be used for a loop like the following:

If MyForm.RufAs.MeAlreadyPlayed = True Or MyForm.iCoSpieler = -1 Then
     For Each row As DataGridViewRow In dgv.Rows
         For n As Integer = 1 To dgv.Columns.Count - 1
             If MyForm.RufAs.MeAlreadyPlayed = True Or MyForm.iCoSpieler = -1 Then

                 If MyForm.Trick_Content.CurrentTrickWinner <> MyForm.iCoSpieler AndAlso MyForm.Trick_Content.CurrentTrickWinner <> DeclarerID Then
                     If n > 0 AndAlso PlayerID <> DeclarerID AndAlso PlayerID <> MyForm.iCoSpieler Then
                         If TrumpCardID <> 4 Then

                             If PlayTogether_WenzUsage(dgvCell, PlayerID, DeclarerID, GameStatus, sTrumpList, TrumpCardID, "RufAs", MyForm, LeadSuitID) = True Then

                                 If row.Cells(n).Value.ToString.Contains("U") Then
                                     If ContainsHandCardsStandardTrumps(CStr(sHandCards)) = False Then ' Or sHandCards Is Nothing Then ' Or MyForm.cardLessThan(MyForm.Trick_Content.PossibleWinnerCardString, row.Cells(n).Value.ToString & row.Cells(0).Value.ToString) Then
                                         If LeadSuitID = TrumpCardID AndAlso row.Cells(n).Value.ToString <> String.Empty Then
                                             SetCurrentCell(dgvCell, dgv, row.Cells(n), row.Cells(0), " ~ " & (String.Format("Line # {0}", (New StackTrace(New StackFrame(True))).GetFrame(0).GetFileLineNumber())) & " ~ ")
                                         End If
                                     End If
                                 End If
                             End If
                         End If

                     End If
                 End If
             End If
         Next
     Next
 End If

QuestionRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Eddy Vluggen20-May-22 8:10
professionalEddy Vluggen20-May-22 8:10 
AnswerRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Jo_vb.net20-May-22 8:56
mvaJo_vb.net20-May-22 8:56 
SuggestionRe: Winforms VB.Net: Best way to code rules for german cards game "Schafkopf"? Pin
Eddy Vluggen20-May-22 23:02
professionalEddy Vluggen20-May-22 23:02 
QuestionUpdating datagridview with image Pin
Jake Mazur17-May-22 3:23
Jake Mazur17-May-22 3:23 
AnswerRe: Updating datagridview with image Pin
Richard MacCutchan17-May-22 3:30
mveRichard MacCutchan17-May-22 3:30 
QuestionUpdating datagridview with image Pin
Jake Mazur17-May-22 3:20
Jake Mazur17-May-22 3:20 
AnswerRe: Updating datagridview with image Pin
Richard Deeming17-May-22 4:10
mveRichard Deeming17-May-22 4:10 
Questionxml with control createinfo Pin
JR21214-May-22 19:59
JR21214-May-22 19:59 
AnswerRe: xml with control createinfo Pin
Richard MacCutchan14-May-22 21:02
mveRichard MacCutchan14-May-22 21:02 
AnswerRe: xml with control createinfo Pin
Dave Kreskowiak15-May-22 4:58
mveDave Kreskowiak15-May-22 4:58 
GeneralRe: xml with control createinfo Pin
JR21216-May-22 8:26
JR21216-May-22 8:26 
GeneralRe: xml with control createinfo Pin
Richard MacCutchan16-May-22 9:09
mveRichard MacCutchan16-May-22 9:09 
GeneralRe: xml with control createinfo Pin
Dave Kreskowiak16-May-22 9:58
mveDave Kreskowiak16-May-22 9:58 
GeneralRe: xml with control createinfo Pin
JR21218-May-22 23:16
JR21218-May-22 23:16 
Questionhow to make .OBJ 3D model viewer for vb.net 2010 Pin
Android Oyunları9-May-22 7:12
Android Oyunları9-May-22 7:12 
AnswerRe: how to make .OBJ 3D model viewer for vb.net 2010 Pin
RedDk9-May-22 10:40
RedDk9-May-22 10:40 
Generalthat link isnt for vs2010 Pin
Android Oyunları22-May-22 5:48
Android Oyunları22-May-22 5:48 

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.