Stap 3: Wanneer het spel begint
Private Sub Open_TwoPlayerForm(sender As System.Object, e As System.EventArgs) verwerkt Me.Activated End Sub
"Dit is de code voor wat er gebeurt wanneer de TwoPlayerForm wordt geopend."
34. invoegen volgende code tussen Private Sub en End Sub:
Dim draai als nieuwe willekeurige Als TurnResult = 1 Then Als TurnResult = 2 Then
Dim TurnResult As Integer = Turn.Next (1, 3)
PlayerTurnLabel.Text = "Rode Turn"
End If
PlayerTurnLabel.Text = "Blue beurt"
End If
"Willekeurig kiest de speler wie eerst gaat."
OvalShape1.Visible = False
OvalShape2.Visible = False
OvalShape3.Visible = False
OvalShape4.Visible = False
OvalShape5.Visible = False
OvalShape6.Visible = False
OvalShape7.Visible = False
OvalShape8.Visible = False
OvalShape9.Visible = False
LineShape1.Visible = False
LineShape2.Visible = False
LineShape3.Visible = False
LineShape4.Visible = False
LineShape5.Visible = False
LineShape6.Visible = False
LineShape7.Visible = False
LineShape8.Visible = False
LineShape9.Visible = False
LineShape10.Visible = False
LineShape11.Visible = False
LineShape12.Visible = False
LineShape13.Visible = False
LineShape14.Visible = False
LineShape15.Visible = False
LineShape16.Visible = False
LineShape17.Visible = False
LineShape18.Visible = False
'Maakt alle cirkels en kruist onzichtbaar.