private void BoardClicked(object sender, MouseEventArgs e) { var clickedBoard = (Label)sender; if (clickedBoard.Text != "") { return; } var row = int.Parse(clickedBoard.Name[5].ToString()); var column = int.Parse(clickedBoard.Name[7].ToString()); clickedBoard.Text = _currentGame.NextHandContent; _currentGame.CurrentHand(row, column); var judgePlayer = _currentGame.JudgeGame(); JudgeCallback(judgePlayer); if (judgePlayer.Result != Judge.JudgeResult.Unfinished) { return; } if (_currentGame.Mode == GameCore.GameMode.AI) { AICallback(_currentGame.AICalc()); var judgeAI = _currentGame.JudgeGame(); JudgeCallback(judgeAI); } }
private void AIFirst_Click(object sender, EventArgs e) { ClearBoard(); _aiContent = "X"; _currentGame = new GameCore(GameCore.GameMode.AI); _currentGame.AnalyzeBoard(); AICallback(_currentGame.AICalc()); }