0
出于某种原因,标签文本拒绝更新,直到ComputerTurn()子。有谁知道为什么它会这样做?为什么不通过标签文本更新?
Sub PlayerTurn(ByVal no As Integer)
pile -= no
lblDisplay.Text = "There are " + pile.ToString + " Stones in the Pile"
If pile = 0 Then
EndGame("Computer")
End If
Threading.Thread.Sleep(2000)
ComputerTurn()
End Sub
Sub ComputerTurn()
Dim stones As Integer = 0
Do
stones = RndInt(1, 3)
Loop While Not CheckNo(stones)
pile -= stones
lblCompDisplay.Text = "Computer took " + pile.ToString + " Stones"
If pile = 0 Then
EndGame("Player")
Else
btnGo.Enabled = True
End If
End Sub
非常感谢您 –