private void btnHexAlphaBeta_Click(object sender, System.EventArgs e) { this.textBox1.Text = "ALPHA BETA Hexapawn"; this.textBox1.Text += System.Environment.NewLine; Hexapawn t4 = new Hexapawn(); while (!(t4.hasEnded())) { this.textBox1.Text += (System.Environment.NewLine + t4.getPlayerToMove(t4.getState()) + " playing ... "); t4.makeAlphaBetaMove(); GameState presentState = t4.getState(); HexapawnBoard board = t4.getBoard(presentState); this.textBox1.Text += System.Environment.NewLine; this.textBox1.Text += board.ToString(); } this.textBox1.Text += "ALPHA BETA Hexapawn DEMO done"; }
private void btnHexMiniMax_Click(object sender, System.EventArgs e) { this.textBox1.Text = "MINI MAX Hexapawn"; this.textBox1.Text += System.Environment.NewLine; Hexapawn t3 = new Hexapawn(); while (!(t3.hasEnded())) { this.textBox1.Text += (System.Environment.NewLine + t3.getPlayerToMove(t3.getState()) + " playing"); this.textBox1.Text += System.Environment.NewLine; t3.makeMiniMaxMove(); GameState presentState = t3.getState(); HexapawnBoard board = t3.getBoard(presentState); this.textBox1.Text += System.Environment.NewLine; this.textBox1.Text += board.ToString(); this.textBox1.Refresh(); this.Refresh(); } this.textBox1.Text += "Mini MAX Hexapawn DEMO done"; }
private void btnHexAlphaBeta_Click(object sender, System.EventArgs e) { this.textBox1.Text = "ALPHA BETA Hexapawn"; this.textBox1.Text += System.Environment.NewLine; Hexapawn t4 = new Hexapawn(); while (!(t4.hasEnded())) { this.textBox1.Text += (System.Environment.NewLine+t4.getPlayerToMove(t4.getState()) + " playing ... "); t4.makeAlphaBetaMove(); GameState presentState = t4.getState(); HexapawnBoard board = t4.getBoard(presentState); this.textBox1.Text += System.Environment.NewLine; this.textBox1.Text += board.ToString(); } this.textBox1.Text += "ALPHA BETA Hexapawn DEMO done"; }