private void ClearAll(string i_Name1, string i_Name2) { m_PlayGame = new PlayGame(i_Name1, i_Name2, m_PlayGame.GameBoard.Rows, m_PlayGame.GameBoard.Cols, m_PlayGame.GameType); Board Board = m_PlayGame.BoardGame; for (int i = 0; i < Board.Rows; i++) { for (int j = 0; j < Board.Cols; j++) { GameCell GameCell = Board.BoardGameMat[i, j]; m_Buttons[i, j].BackColor = System.Drawing.SystemColors.ControlDark; m_Buttons[i, j].Click += m_Button_Click; } } updateScore(); m_CurrPlayer = eCurrentPlayer.Player1; this.m_CurrentPlayerLabel.Text = "Current Player: " + m_PlayGame.FirstPlayer.Name; this.m_CurrentPlayerLabel.BackColor = this.m_FirstPlayerLabel.BackColor; }
public MemoryGameForm(int i_rows, int i_cols, string i_FirstPlayer, string i_SecondPlayer, eGameType i_GameType) { m_PlayGame = new PlayGame(i_FirstPlayer, i_SecondPlayer, i_rows, i_cols, i_GameType); InitializeComponent(); }