【发布时间】:2020-12-13 17:50:59
【问题描述】:
我正在尝试将负责处理玩家移动的方法转换为能够正确运行代码的类。但是,我对类非常缺乏经验,无法弄清楚为什么我的代码会出现关于当前格式不存在的无尽错误。如果有人可以将我推向正确的方向,我将不胜感激。下面我有我想要移动到一个类的代码。
var button = (Button)sender;
button.Text = playerchoice.ToString();
button.Enabled = false;
consolelistbox.Items.Add("Player has selected " + button.Name + " to put their " + playerchoice.ToString());
buttons.Remove(button);
numberofturns += 1;
PlayerWinConditions(playerchoice);
TieConditions();
playerturn = false;
【问题讨论】:
-
如果您希望我们修复您的课程,您需要向我们展示您目前获得的代码