private void newGame(int Players) { gameEngine = new ticTacToeEngine(Players); for (int i = 1; i < 10; i++) { buttons[i].Text = ""; buttons[i].Enabled = true; } }
public mainForm() { InitializeComponent(); gameEngine = new ticTacToeEngine(2); buttons = new Button[10]; buttons[1] = bottomLeftSquareButtom; buttons[2] = bottomMiddleSquareButton; buttons[3] = bottomRightSquareButton; buttons[4] = midLeftSquareButton; buttons[5] = midMiddleSquareButton; buttons[6] = midRightSquareButton; buttons[7] = topLeftSquareButton; buttons[8] = topMiddleSquareButton; buttons[9] = topRightSquareButton; }