我做了一个简单的tic,tac,toe游戏。我有两种形式,Form1
和frmStats
。在我的frmStats
我有一个标签lblDraw
。我想要它,所以当玩家打成平局时,标签会加一。如何从Form1
的代码中访问它?
我的 Form1 代码:
if (winner != 0)
this.Text = String.Format("Player {0} Wins!", winner);
else if (winner == 0 && turnCounter == 9)
this.Text = "Draw!";
//this is where i want/think the code should be to change the label
else
...