示例#1
0
        private void initializeComponents()
        {
            StartPosition   = FormStartPosition.CenterScreen;
            FormBorderStyle = FormBorderStyle.Fixed3D;
            MaximizeBox     = false;

            for (int x = 0; x < r_GameBoard.Size; x++)
            {
                for (int y = 0; y < r_GameBoard.Size; y++)
                {
                    r_BoardButtons[x, y] = new CellButton(x, y);
                    Controls.Add(r_BoardButtons[x, y]);
                }
            }

            Size = new Size(r_GameBoard.Size * 50, (r_GameBoard.Size * 50) + 20);
            Text = string.Format("Othello - {0}'s Turn", r_GameState.CurrentPlayer);
        }
示例#2
0
        private void BoardWindow_Click(object i_Sender, EventArgs i_EventArgs)
        {
            CellButton buttonClicked = (CellButton)i_Sender;

            r_GameState.PlayMove(buttonClicked.X, buttonClicked.Y);
        }