Ejemplo n.º 1
0
        public void Think()
        {
            _controller.DisablePlayerMoves();
            int column = _strategy.NextMove(new Board(_controller.GetBoard(), _me, 1 + (_me % 2)));
            int row    = _controller.DropDisc(column);

            _controller.EnableValidPlayerMoves();
        }
Ejemplo n.º 2
0
            /* protected override void OnPaint(PaintEventArgs pevent)
             * {
             *   if (IsPickedColumn)
             *   {
             *       Rectangle rectangle = new Rectangle(0, 0, Size.Width, Size.Height);
             *       //pevent.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(10, 0, 0, 0)), rectangle);
             *       pevent.Graphics.DrawRectangle(new Pen(Color.Black), rectangle);
             *   }
             *   Font drawFont = new Font("Arial", 12);
             *   var drawBrush = new SolidBrush(Color.Black);
             *   pevent.Graphics.DrawString($"{_column}", drawFont, drawBrush, 0, Height);
             * }
             *
             * protected override void OnMouseHover(EventArgs e)
             * {
             *   base.OnMouseHover(e);
             *   IsPickedColumn = true;
             *   Invalidate();
             * }
             *
             * protected override void OnMouseLeave(EventArgs e)
             * {
             *   base.OnMouseLeave(e);
             *   IsPickedColumn = false;
             *   Invalidate();
             * }*/

            protected override void OnClick(EventArgs e)
            {
                _controller.DropDisc(_column);
            }