示例#1
0
 private void StartGameButton_Clicked(object sender, EventArgs e)
 {
     string[]  playerNames = { m_Player1TextBox.Text, m_Player2TextBox.Text };
     decimal[] dimensions  = { m_RowsNumericUpDown.Value, m_ColsNumericUpDown.Value };
     m_parameters = new PreGameParameters(playerNames, !m_Player2CheckBox.Checked, dimensions);
     Close();
 }
示例#2
0
 public Game(PreGameParameters i_Parameters)
 {
     m_Board      = new GameBoard(i_Parameters.Row, i_Parameters.Column);
     m_Players    = new Player[2];
     m_Players[0] = new Player(m_Player1Symbol);
     m_Players[1] = new Player(m_Player2Symbol,
                               i_Parameters.CPU, i_Parameters.Column);
 }
示例#3
0
        public GameInterface(PreGameParameters i_Parameters, Game i_Game)
        {
            m_Names   = i_Parameters.GetPlayersNames();
            base.Text = "4 In A Row";
            r_Columns = i_Parameters.Column;
            r_Rows    = i_Parameters.Row;

            initializeNumericRow(r_Columns, i_Game);
            initializeBoard(r_Rows, r_Columns);
            initializeLabels(r_Columns, r_Rows);
            integrateGame(i_Game);
        }