Esempio n. 1
0
        public void UpdateBoardWith(eCoinType[][] i_BoardData)
        {
            if (i_BoardData.Length != s_BoardSize)
            {
                s_BoardSize = i_BoardData.Length;
                m_ControlSquares = createSquareControls();
            }

            for (var i = 0; i < s_BoardSize; i++)
            {
                for (var j = 0; j < s_BoardSize; j++)
                {
                    m_ControlSquares[i][j].PieceType = i_BoardData[i][j];
                    if (m_ControlSquares[i][j].PieceType == eCoinType.Move)
                    {
                        m_ControlSquares[i][j].BackgroundType = eBackType.ValidMove;
                    }
                    else
                    {
                        m_ControlSquares[i][j].BackgroundType = eBackType.Normal;
                    }
                }
            }

            repaintBoard();
        }
Esempio n. 2
0
 public FormsBoardView()
 {
     m_ControlSquares = createSquareControls();
 }