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
非常感謝您 –