public void BuildColorsTable() { int currentNumColor = 0; for (int row = 0; row < k_NumOfRows; row++) { for (int col = 0; col < k_NumOfColorsInRow; col++) { Button buttonToAdd = new Button(); buttonToAdd.Size = new Size(45, 45); buttonToAdd.Click += button_Click; buttonToAdd.BackColor = GameColors.GetColorName(currentNumColor); currentNumColor++; m_TableOfColors.Controls.Add(buttonToAdd, col, row); } } m_TableOfColors.AutoSize = true; m_TableOfColors.Left = 5; m_TableOfColors.Top = 5; Controls.Add(m_TableOfColors); }
private void exposeHiddenFirstLine(int[] i_HiddenSequence) { for (int col = 0; col < r_MaxLengthOfInput; col++) { m_GameBoard.GetControlFromPosition(col, k_HiddenSquaresRow).BackColor = GameColors.GetColorName(i_HiddenSequence[col] - 1); } }