private void btnAlphaBetaOctapawn_Click(object sender, System.EventArgs e) { this.textBox1.Text = "ALPHA BETA Octapawn "; this.textBox1.Text += System.Environment.NewLine; Octapawn t4 = new Octapawn(); while (!(t4.hasEnded())) { this.textBox1.Text += (System.Environment.NewLine + t4.getPlayerToMove(t4.getState()) + " playing ... "); t4.makeAlphaBetaMove(); GameState presentState = t4.getState(); OctapawnBoard board = t4.getBoard(presentState); this.textBox1.Text += System.Environment.NewLine; this.textBox1.Text += board.ToString(); this.textBox1.Refresh(); this.Refresh(); } this.textBox1.Text += "ALPHA BETA Octapawn DEMO done"; }
private void btnMiniMaxOctapawn_Click(object sender, System.EventArgs e) { this.textBox1.Text = "MINI MAX Octapawn"; this.textBox1.Text += System.Environment.NewLine; Octapawn t3 = new Octapawn(); 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(); OctapawnBoard 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 Octapawn DEMO done"; }
private void btnAlphaBetaOctapawn_Click(object sender, System.EventArgs e) { this.textBox1.Text = "ALPHA BETA Octapawn "; this.textBox1.Text += System.Environment.NewLine; Octapawn t4 = new Octapawn(); while (!(t4.hasEnded())) { this.textBox1.Text += (System.Environment.NewLine+t4.getPlayerToMove(t4.getState()) + " playing ... "); t4.makeAlphaBetaMove(); GameState presentState = t4.getState(); OctapawnBoard board = t4.getBoard(presentState); this.textBox1.Text += System.Environment.NewLine; this.textBox1.Text += board.ToString(); this.textBox1.Refresh(); this.Refresh(); } this.textBox1.Text += "ALPHA BETA Octapawn DEMO done"; }