private void paintButtons(string i_ButtonsColors, List <Button> i_Buttons)
 {
     for (int i = 0; i < i_ButtonsColors.Length; i++)
     {
         GameBoardUtils.DefineBackColor(i_Buttons[i], i_ButtonsColors[i].ToString());
     }
 }
 private void initializeGameBoardAnData()
 {
     m_GameData = new GameData(m_NumberOfChances);
     r_CodeButtons.Add(buttonCode1);
     r_CodeButtons.Add(buttonCode2);
     r_CodeButtons.Add(buttonCode3);
     r_CodeButtons.Add(buttonCode4);
     s_ButtonsGuessMatrix = new Button[m_NumberOfChances, m_GameData.NumberOfElementsToGuess];
     s_ButtonResultMatrix = new Button[m_NumberOfChances, m_GameData.NumberOfElementsToGuess];
     s_ArrowsButtons      = new Button[m_NumberOfChances];
     GameBoardUtils.putButtonsInMatrix(s_ButtonsGuessMatrix, this, "GuessButton");
     GameBoardUtils.putButtonsInArray(s_ArrowsButtons, "ArrowButton");
     GameBoardUtils.putButtonsInMatrix(s_ButtonResultMatrix, this, "ResultButton");
     putGuessButtonsOnBoard();
     putArrowButtonsOnBoard();
     putResultButtonsOnBoard();
 }
        private void paintResultButtons()
        {
            List <Button> buttonListToParse = new List <Button>();
            List <Button> buttonListToPaint = new List <Button>();

            for (int i = 0; i < m_GameData.NumberOfElementsToGuess; i++)
            {
                s_ButtonsGuessMatrix[m_GameData.CurrentGuess, i].Enabled = false;
                buttonListToPaint.Add(s_ButtonResultMatrix[m_GameData.CurrentGuess, i]);
                buttonListToParse.Add(s_ButtonsGuessMatrix[m_GameData.CurrentGuess, i]);
            }
            m_GameData.InsertGuess(GameBoardUtils.ParseButtonsToString(buttonListToParse));
            paintButtons(m_GameData.UserGuesses[1, m_GameData.CurrentGuess - 1], buttonListToPaint);
            for (int i = 0; i < m_GameData.NumberOfElementsToGuess; i++)
            {
                buttonListToPaint[i].Enabled = false;
                s_ButtonResultMatrix[m_GameData.CurrentGuess - 1, i] = buttonListToPaint[i];
            }
        }