Example #1
0
        private void btnAlphaBetaDecapawn_Click(object sender, System.EventArgs e)
        {
            this.textBox1.Text  = "ALPHA BETA Decapawn ";
            this.textBox1.Text += System.Environment.NewLine;
            Decapawn t4 = new Decapawn();

            while (!(t4.hasEnded()))
            {
                this.textBox1.Text += (System.Environment.NewLine + t4.getPlayerToMove(t4.getState())
                                       + "  playing ... ");

                t4.makeAlphaBetaMove();
                GameState     presentState = t4.getState();
                DecapawnBoard 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 Decapawn DEMO done";
        }
Example #2
0
		private void btnAlphaBetaDecapawn_Click(object sender, System.EventArgs e)
		{
			this.textBox1.Text = "ALPHA BETA Decapawn ";
			this.textBox1.Text +=  System.Environment.NewLine;
			Decapawn t4 = new Decapawn();
			while (!(t4.hasEnded())) 
			{
				this.textBox1.Text += (System.Environment.NewLine+t4.getPlayerToMove(t4.getState())
					+ "  playing ... ");

				t4.makeAlphaBetaMove();
				GameState presentState = t4.getState();
				DecapawnBoard 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 Decapawn DEMO done";
		}