setColor() публичный Метод

public setColor ( bool w ) : void
w bool
Результат void
Пример #1
0
 public Figure Clone()
 {
     Figure clone = new Figure(_figureType, _row, _col, _board);
     clone.setColor(_white);
     return clone;
 }
Пример #2
0
        public void setContent(String fig, String col)
        {
            if (data == null)
                return;

            if (fig.Length != col.Length)
                return;

            for (int i = 0; i < fig.Length; ++i)
            {
                int row        = i / dimension[0];
                int column     = i % dimension[1];

                Figure.FigureType ftype = (Figure.FigureType)(int.Parse(fig[i] + ""));

                if (ftype == Figure.FigureType.Nothing)
                    continue;

                bool white      = col[i] == '1';

                Figure figure   = new Figure(ftype, row, column, this);
                figure.setColor(white);
                data[row, column]  = figure;
            }
        }